From 999ae6be3243c7b4a815247199447b53c39a3d65 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 03:26:58 +0200 Subject: Adding upstream version 1:7.9p1. Signed-off-by: Daniel Baumann --- hash.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 hash.c (limited to 'hash.c') diff --git a/hash.c b/hash.c new file mode 100644 index 0000000..5875d41 --- /dev/null +++ b/hash.c @@ -0,0 +1,27 @@ +/* $OpenBSD: hash.c,v 1.4 2017/12/14 21:07:39 naddy Exp $ */ + +/* $OpenBSD: hash.c,v 1.5 2018/01/13 00:24:09 naddy Exp $ */ +/* + * Public domain. Author: Christian Weisgerber + * API compatible reimplementation of function from nacl + */ + +#include "crypto_api.h" + +#include + +#include "digest.h" +#include "log.h" +#include "ssherr.h" + +int +crypto_hash_sha512(unsigned char *out, const unsigned char *in, + unsigned long long inlen) +{ + int r; + + if ((r = ssh_digest_memory(SSH_DIGEST_SHA512, in, inlen, out, + crypto_hash_sha512_BYTES)) != 0) + fatal("%s: %s", __func__, ssh_err(r)); + return 0; +} -- cgit v1.2.3