Welcome to little lamb

Code » test-hashes » master » tree

[master] / src / sha256-ska.c

#include <skalibs/stdcrypto.h>

static SHA256Schedule ctx;

void init(void)
{
    sha256_init(&ctx);
}

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

void final(unsigned char *md)
{
    sha256_final(&ctx, (char *) md);
}

int hashlen(void)
{
    return 32;
}