LegacySha1 structv0.1.0
An incremental SHA-1.
pub struct LegacySha1 {
// private fields
}
Broken for collision resistance; see the note at the top of this file.
Structural Copy; copying takes an independent snapshot of the digest state.
Constructors
LegacySha1
pub func LegacySha1() -> LegacySha1
A SHA-1 state.
Returns: a SHA-1 hasher, which is broken and is here only to read what already exists
Methods
Update
pub func Update(self: &var LegacySha1, bytes: char8[..])
Adds bytes to the message.
| Name | Type | Description |
|---|---|---|
bytes | char8[..] | the bytes to absorb |
Finish
pub func Finish(self: &var LegacySha1, into: var char8[..])
Writes the twenty-byte digest into into.
| Name | Type | Description |
|---|---|---|
into | var char8[..] | receives the output |
Related
LegacySha1Of
pub func LegacySha1Of(bytes: char8[..], into: var char8[..])
The SHA-1 digest of bytes. Broken for collision resistance; see the note at the top of this file.
Parameters
| Name | Type | Description |
|---|---|---|
bytes | char8[..] | the bytes to absorb |
into | var char8[..] | receives the output |