mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
15 lines
374 B
C
15 lines
374 B
C
#include "sha512.h"
|
|
#include "sph_sha2.h"
|
|
#include "zeroize.h"
|
|
|
|
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);
|
|
zeroize((unsigned char*)&ctx, sizeof(ctx));
|
|
return 0;
|
|
}
|