crypto.sha1 #
Constants #
const (
// The size of a SHA-1 checksum in bytes.
size = 20
// The blocksize of SHA-1 in bytes.
block_size = 64
)
fn hexhash #
fn hexhash(s string) string
hexhash returns a hexadecimal SHA1 hash sum string of s.
fn new #
fn new() &Digest
new returns a new Digest (implementing hash.Hash) computing the SHA1 checksum.
fn sum #
fn sum(data []u8) []u8
sum returns the SHA-1 checksum of the bytes passed in data.
fn (Digest) write #
fn (mut d Digest) write(p_ []u8) !int
write writes the contents of p_ to the internal hash representation.
fn (Digest) sum #
fn (d &Digest) sum(b_in []u8) []u8
sum returns a copy of the generated sum of the bytes in b_in.
fn (Digest) checksum #
fn (mut d Digest) checksum() []u8
checksum returns the current byte checksum of the Digest.
fn (Digest) size #
fn (d &Digest) size() int
size returns the size of the checksum in bytes.
fn (Digest) block_size #
fn (d &Digest) block_size() int
block_size returns the block size of the checksum in bytes.