From 8ef2a4e5f54c8623c98c396e378ec093629b849b Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Sun, 6 Jun 2021 23:01:11 -0400 Subject: Add support for the SHA-3 core. --- rpc_hash.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'rpc_hash.c') diff --git a/rpc_hash.c b/rpc_hash.c index 13b6891..70c97f4 100644 --- a/rpc_hash.c +++ b/rpc_hash.c @@ -5,6 +5,8 @@ * * Authors: Rob Austein * Copyright (c) 2015-2016, NORDUnet A/S All rights reserved. + * Copyright: 2021, The Commons Conservancy Cryptech Project + * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -16,9 +18,9 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * - Neither the name of the NORDUnet nor the names of its contributors may - * be used to endorse or promote products derived from this software - * without specific prior written permission. + * - Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -163,6 +165,10 @@ static inline const hal_hash_descriptor_t *alg_to_descriptor(const hal_digest_al case HAL_DIGEST_ALGORITHM_SHA512_256: return hal_hash_sha512_256; case HAL_DIGEST_ALGORITHM_SHA384: return hal_hash_sha384; case HAL_DIGEST_ALGORITHM_SHA512: return hal_hash_sha512; + case HAL_DIGEST_ALGORITHM_SHA3_224: return hal_hash_sha3_224; + case HAL_DIGEST_ALGORITHM_SHA3_256: return hal_hash_sha3_256; + case HAL_DIGEST_ALGORITHM_SHA3_384: return hal_hash_sha3_384; + case HAL_DIGEST_ALGORITHM_SHA3_512: return hal_hash_sha3_512; default: return NULL; } } -- cgit v1.2.3