1 /* $OpenBSD: hash.c,v 1.4 2017/12/14 21:07:39 naddy Exp $ */
3 /* $OpenBSD: hash.c,v 1.5 2018/01/13 00:24:09 naddy Exp $ */
5 * Public domain. Author: Christian Weisgerber <naddy@openbsd.org>
6 * API compatible reimplementation of function from nacl
9 #include "crypto_api.h"
18 crypto_hash_sha512(unsigned char *out, const unsigned char *in,
19 unsigned long long inlen)
23 if ((r = ssh_digest_memory(SSH_DIGEST_SHA512, in, inlen, out,
24 crypto_hash_sha512_BYTES)) != 0)
25 fatal("%s: %s", __func__, ssh_err(r));