Welcome to little lamb

Code » test-hashes » master » tree

[master] / src / sha3-unrolled.c

#include "sha3-unrolled.h"

static keccak_state ctx;

void init(void)
{
    keccak_digest_init(&ctx, 256);
}

void update(const char *msg, size_t size)
{
    keccak_digest_update(&ctx, (const uint8_t *) msg, size);
}

void final(unsigned char *md)
{
    keccak_digest_sum(&ctx, (uint8_t *) md, 32);
}

int hashlen(void)
{
    return 32;
}