15 lines
374 B
C
Raw Normal View History

2014-06-24 12:59:22 -07:00
#include "sha512.h"
#include "sph_sha2.h"
2014-07-24 11:24:54 -07:00
#include "zeroize.h"
2014-06-24 12:59:22 -07:00
int crypto_hash_sha512_ref(unsigned char *output ,const unsigned char *input,
unsigned long long len)
{
sph_sha512_context ctx;
sph_sha512_init(&ctx);
sph_sha512(&ctx, input, len);
sph_sha512_close(&ctx, output);
2014-07-24 11:24:54 -07:00
zeroize((unsigned char*)&ctx, sizeof(ctx));
2014-06-24 12:59:22 -07:00
return 0;
}