hash.c 266 B

123456789101112
  1. #include "crypto_hash.h"
  2. #include "sph_sha2.h"
  3. int crypto_hash(unsigned char *out,const unsigned char *in,unsigned long long inlen)
  4. {
  5. sph_sha512_context mc;
  6. sph_sha512_init(&mc);
  7. sph_sha512(&mc, in, inlen);
  8. sph_sha512_close(&mc,out);
  9. return 0;
  10. }