Lyricdev
GitHub

class Sha1

pub class Sha1 :: [Digest]

Conforms to Digest.

SHA-1 (FIPS 180-4 §6.1): 20 bytes of hash over blocks of 64. Not collision-resistant: use it only where a format requires it — git's object names, a checksum —, never for a signature.

Constants

pub static let size: int = 20
pub static let blockSize: int = 64

Methods

pub static fn new(): Sha1
pub mut fn update(bytes: Slice<uint8>): void
pub fn finish(): uint8[]