std1.0.0-beta-7 SafeC docs

std :: crypto::sha1

Struct std::Sha1Ctx

#include <std/crypto/sha1.h> source

struct Sha1Ctx {
    unsigned int h[5];
    unsigned char buf[SHA1_BLOCK_SIZE];
    unsigned long total_bytes;
}

Fields

§unsigned int h[5]source

current hash state

§unsigned char buf[SHA1_BLOCK_SIZE]source

partial block buffer

§unsigned long total_bytessource

total bytes processed

Methods

§static struct Sha1Ctx new()source · definition

A fresh SHA-1 context.

§void update([]const unsigned char data)source · definition

Feed len bytes of data into the hash.

§void finish([]unsigned char digest)source · definition

Finalise and write the 20-byte digest.

§unsigned long digest_size() constsource · definition

SHA1_DIGEST_SIZE / SHA1_BLOCK_SIZE (hash.h's BlockHash).

§unsigned long block_size() constsource · definition