TianoCore EDK2 master
|
#include "CryptParallelHash.h"
Go to the source code of this file.
Functions | |
UINT8 EFIAPI | KeccakInit (OUT Keccak1600_Ctx *Context, IN UINT8 Pad, IN UINTN BlockSize, IN UINTN MessageDigestLen) |
UINT8 EFIAPI | Sha3Update (IN OUT Keccak1600_Ctx *Context, IN const VOID *Data, IN UINTN DataSize) |
UINT8 EFIAPI | Sha3Final (IN OUT Keccak1600_Ctx *Context, OUT UINT8 *MessageDigest) |
SHA3 realted functions from OpenSSL.
Copyright (c) 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Copyright 2022 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html
Definition in file CryptSha3.c.
UINT8 EFIAPI KeccakInit | ( | OUT Keccak1600_Ctx * | Context, |
IN UINT8 | Pad, | ||
IN UINTN | BlockSize, | ||
IN UINTN | MessageDigestLen | ||
) |
Keccak initial fuction.
Set up state with specified capacity.
[out] | Context | Pointer to the context being initialized. |
[in] | Pad | Delimited Suffix. |
[in] | BlockSize | Size of context block. |
[in] | MessageDigestLen | Size of message digest in bytes. |
1 | Initialize successfully. |
0 | Fail to initialize. |
Definition at line 31 of file CryptSha3.c.
UINT8 EFIAPI Sha3Final | ( | IN OUT Keccak1600_Ctx * | Context, |
OUT UINT8 * | MessageDigest | ||
) |
Completes computation of Sha3 message digest.
This function completes sha3 hash computation and retrieves the digest value into the specified memory. After this function has been called, the keccak context cannot be used again.
[in,out] | Context | Pointer to the keccak context. |
[out] | MessageDigest | Pointer to a buffer that receives the message digest. |
1 | Meaasge digest computation succeeded. |
Definition at line 137 of file CryptSha3.c.
UINT8 EFIAPI Sha3Update | ( | IN OUT Keccak1600_Ctx * | Context, |
IN const VOID * | Data, | ||
IN UINTN | DataSize | ||
) |
Sha3 update fuction.
This function performs Sha3 digest on a data buffer of the specified size. It can be called multiple times to compute the digest of long or discontinuous data streams.
[in,out] | Context | Pointer to the Keccak context. |
[in] | Data | Pointer to the buffer containing the data to be hashed. |
[in] | DataSize | Size of Data buffer in bytes. |
1 | Update successfully. |
Definition at line 66 of file CryptSha3.c.