[#BloombergLP-bdlde-Sha1]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::Sha1
:relfileprefix: ../../
:mrdocs:

This `class` represents a SHA&hyphen;1 digest that can be updated as additional data is provided&period;

== Synopsis

Declared in `&lt;bdlde&lowbar;sha1&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class Sha1;
----

== Description

More generally, this class supports a complete set of _value_ _semantic_ operations, including copy construction, assignment, equality comparison, and `ostream` printing&period; (A precise operational definition of when two instances have the same value can be found in the description of `operator&equals;&equals;` for the class&period;) This container is _exception_ _neutral_ with no guarantee of rollback&colon; if an exception is thrown during the invocation of a method on a pre&hyphen;existing instance, the class is left in a valid state, but its value is undefined&period; In no event is memory leaked&period; Finally, _aliasing_ (e&period;g&period;, using all or part of an object as both source and destination) is supported in all cases&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlde/Sha1/2constructor-05.adoc[`Sha1`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlde/Sha1/loadDigest.adoc[`loadDigest`] 
| Load the current value of this SHA&hyphen;1 digest into the specified `result`&period;
| xref:BloombergLP/bdlde/Sha1/loadDigestAndReset.adoc[`loadDigestAndReset`] 
| Load the current value of this SHA&hyphen;1 digest into the specified `result` and reset this `Sha1` object to the default&hyphen;constructed state&period;
| xref:BloombergLP/bdlde/Sha1/print.adoc[`print`] 
| Format the current value of this SHA&hyphen;1 digest to the specified output `stream` and return a reference to the modifiable `stream`&period;
| xref:BloombergLP/bdlde/Sha1/reset.adoc[`reset`] 
| Reset the value of this SHA&hyphen;1 digest to the value provided by the default constructor&period;
| xref:BloombergLP/bdlde/Sha1/update.adoc[`update`] 
| Update this SHA&hyphen;1 digest to incorporate the specified data&period;
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlde/Sha1/k_DIGEST_SIZE.adoc[`k&lowbar;DIGEST&lowbar;SIZE`] 
| The size (in bytes) of the output
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlde/operator_eq-0f3.adoc[BloombergLP::bdlde::operator&equals;&equals;]`
| Return `true` if the specified `lhs` and `rhs` SHA&hyphen;1 digests have the same value&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlde/operator_not_eq-02.adoc[`operator!&equals;`]
| Return `true` if the SHA&hyphen;1 digests differ&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
