}
}
-void crypto_sha512_finish(crypto_sha512_ctx *ctx, u8 out[64])
+void crypto_sha512_final(crypto_sha512_ctx *ctx, u8 out[64])
{
incr(ctx->m_size, ctx->m_index * 8); // size is in bits
set_input(ctx, 128); // padding
crypto_sha512_ctx ctx;
crypto_sha512_init (&ctx);
crypto_sha512_update(&ctx, m, n);
- crypto_sha512_finish(&ctx, out);
+ crypto_sha512_final (&ctx, out);
}
void crypto_sha512_init (crypto_sha512_ctx *ctx);
void crypto_sha512_update(crypto_sha512_ctx *ctx,
const uint8_t *in, size_t inlen);
-void crypto_sha512_finish(crypto_sha512_ctx *ctx, uint8_t out[64]);
+void crypto_sha512_final (crypto_sha512_ctx *ctx, uint8_t out[64]);
void crypto_sha512(uint8_t *out,const uint8_t *input, size_t input_size);
msg: 61626364656667686263646566676869636465666768696a6465666768696a6b65666768696a6b6c666768696a6b6c6d6768696a6b6c6d6e68696a6b6c6d6e6f696a6b6c6d6e6f706a6b6c6d6e6f70716b6c6d6e6f7071726c6d6e6f707172736d6e6f70717273746e6f707172737475
hash: 8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909
+
+msg: 6162636465666768414243444546474861626364656667684142434445464748616263646566676841424344454647486162636465666768414243444546474861626364656667684142434445464748616263646566676841424344454647486162636465666768414243444546474861626364656667684142434445464748
+hash: 0d10792e998fcb5ba10fa1e8d416263b4afb8b830d617b240a4b6f547847dbfe232b0e2d1c0cfb242a0a7da528bdeaaafe00ca516407130dac81fbc4c24c5893