LegacySha1 structv0.1.0

Source
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

Source

Methods

Update

pub func Update(self: &var LegacySha1, bytes: char8[..])

Adds bytes to the message.

NameTypeDescription
byteschar8[..]the bytes to absorb

Source

Finish

pub func Finish(self: &var LegacySha1, into: var char8[..])

Writes the twenty-byte digest into into.

NameTypeDescription
intovar char8[..]receives the output

Source

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.

Source

Parameters

NameTypeDescription
byteschar8[..]the bytes to absorb
intovar char8[..]receives the output