TianoCore EDK2 master
|
#include <PiPei.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseCryptLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/HashLib.h>
Go to the source code of this file.
Functions | |
VOID | Tpm2SetSha512ToDigestList (IN TPML_DIGEST_VALUES *DigestList, IN UINT8 *Sha512Digest) |
EFI_STATUS EFIAPI | Sha512HashInit (OUT HASH_HANDLE *HashHandle) |
EFI_STATUS EFIAPI | Sha512HashUpdate (IN HASH_HANDLE HashHandle, IN VOID *DataToHash, IN UINTN DataToHashLen) |
EFI_STATUS EFIAPI | Sha512HashFinal (IN HASH_HANDLE HashHandle, OUT TPML_DIGEST_VALUES *DigestList) |
EFI_STATUS EFIAPI | HashInstanceLibSha512Constructor (VOID) |
Variables | |
HASH_INTERFACE | mSha512InternalHashInstance |
This library is BaseCrypto SHA512 hash instance. It can be registered to BaseCrypto router, to serve as hash engine.
Copyright (c) 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file HashInstanceLibSha512.c.
EFI_STATUS EFIAPI HashInstanceLibSha512Constructor | ( | VOID | ) |
The function register SHA512 instance.
EFI_SUCCESS | SHA512 instance is registered, or system does not support register SHA512 instance |
Definition at line 134 of file HashInstanceLibSha512.c.
EFI_STATUS EFIAPI Sha512HashFinal | ( | IN HASH_HANDLE | HashHandle, |
OUT TPML_DIGEST_VALUES * | DigestList | ||
) |
Complete hash sequence complete.
HashHandle | Hash handle. |
DigestList | Digest list. |
EFI_SUCCESS | Hash sequence complete and DigestList is returned. |
Definition at line 102 of file HashInstanceLibSha512.c.
EFI_STATUS EFIAPI Sha512HashInit | ( | OUT HASH_HANDLE * | HashHandle | ) |
Start hash sequence.
HashHandle | Hash handle. |
EFI_SUCCESS | Hash sequence start and HandleHandle returned. |
EFI_OUT_OF_RESOURCES | No enough resource to start hash. |
Definition at line 49 of file HashInstanceLibSha512.c.
EFI_STATUS EFIAPI Sha512HashUpdate | ( | IN HASH_HANDLE | HashHandle, |
IN VOID * | DataToHash, | ||
IN UINTN | DataToHashLen | ||
) |
Update hash sequence data.
HashHandle | Hash handle. |
DataToHash | Data to be hashed. |
DataToHashLen | Data size. |
EFI_SUCCESS | Hash sequence updated. |
Definition at line 78 of file HashInstanceLibSha512.c.
VOID Tpm2SetSha512ToDigestList | ( | IN TPML_DIGEST_VALUES * | DigestList, |
IN UINT8 * | Sha512Digest | ||
) |
The function set SHA512 to digest list.
DigestList | digest list |
Sha512Digest | SHA512 digest |
Definition at line 25 of file HashInstanceLibSha512.c.
HASH_INTERFACE mSha512InternalHashInstance |
Definition at line 120 of file HashInstanceLibSha512.c.