std1.0.0-beta-7 SafeC docs

std :: crypto::digest

Struct std::DigestCtx

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

struct DigestCtx {
    int alg;
    struct Sha1Ctx s1;
    struct Sha256Ctx s256;
    struct Sha512Ctx s512;
}

A streaming hash of any DIGEST_* algorithm.

Fields

§int algsource
§struct Sha1Ctx s1source
§struct Sha256Ctx s256source
§struct Sha512Ctx s512source

Methods

§static struct DigestCtx new(int alg)source · definition

'alg' must be a known id (else alg is DIGEST_NONE and finish writes 0 bytes).

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

Writes the digest; returns its length.