Crate sha1 [] [src]

A minimal implementation of SHA1 for rust.

Example:

extern crate sha1;

let mut m = sha1::Sha1::new();
m.update(b"Hello World!");
assert_eq!(m.digest().to_string(),
           "2ef7bde608ce5404e97d5f042f95f89f1c232871");

Structs

Digest

Digest generated from a Sha1 instance.

Sha1

Represents a Sha1 hash object in memory.

Constants

DIGEST_LENGTH

The length of a SHA1 digest in bytes

Functions

sha1_digest_round_x4

Emulates llvm.x86.sha1rnds4 intrinsic. Performs 4 rounds of the message block digest.

sha1_first

Not an intrinsic, but gets the first element of a vector.

sha1_first_add

Not an intrinsic, but adds a word to the first element of a vector.

sha1_first_half

Emulates llvm.x86.sha1nexte intrinsic.

sha1_schedule_x4

Performs 4 rounds of the message schedule update.