sha1-asm 0.1.0

Assembly implementation of SHA-1 hash function

An implementation of the SHA-1 cryptographic hash algorithm.


use sha1_asm::{Sha1, Digest};

// create a Sha1 object
let mut sh = Sha1::default();

// write input message
sh.input(b"hello world");

// read hash digest in the form of GenericArray which is in this case
// equivalent to [u8; 20]
let output = sh.result();
assert_eq!(output[..], [0x2a, 0xae, 0x6c, 0x35, 0xc9, 0x4f, 0xcf, 0xb4, 0x15, 0xdb,
                        0xe9, 0x5f, 0x40, 0x8b, 0x9c, 0xe9, 0x1e, 0xe8, 0x46, 0xed]);