30 DigestList->count = 1;
31 DigestList->digests[0].hashAlg = TPM_ALG_SM3_256;
33 DigestList->digests[0].digest.sm3_256,
50 OUT HASH_HANDLE *HashHandle
59 return EFI_OUT_OF_RESOURCES;
64 *HashHandle = (HASH_HANDLE)Sm3Ctx;
81 IN HASH_HANDLE HashHandle,
88 Sm3Ctx = (VOID *)HashHandle;
89 Sm3Update (Sm3Ctx, DataToHash, DataToHashLen);
105 IN HASH_HANDLE HashHandle,
112 Sm3Ctx = (VOID *)HashHandle;
123 HASH_ALGORITHM_SM3_256_GUID,
143 if ((Status ==
EFI_SUCCESS) || (Status == EFI_UNSUPPORTED)) {
UINTN EFIAPI Sm3GetContextSize(VOID)
BOOLEAN EFIAPI Sm3Update(IN OUT VOID *Sm3Context, IN CONST VOID *Data, IN UINTN DataSize)
#define SM3_256_DIGEST_SIZE
BOOLEAN EFIAPI Sm3Final(IN OUT VOID *Sm3Context, OUT UINT8 *HashValue)
BOOLEAN EFIAPI Sm3Init(OUT VOID *Sm3Context)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_STATUS EFIAPI Sm3HashFinal(IN HASH_HANDLE HashHandle, OUT TPML_DIGEST_VALUES *DigestList)
EFI_STATUS EFIAPI Sm3HashInit(OUT HASH_HANDLE *HashHandle)
EFI_STATUS EFIAPI HashInstanceLibSm3Constructor(VOID)
EFI_STATUS EFIAPI Sm3HashUpdate(IN HASH_HANDLE HashHandle, IN VOID *DataToHash, IN UINTN DataToHashLen)
VOID Tpm2SetSm3ToDigestList(IN TPML_DIGEST_VALUES *DigestList, IN UINT8 *Sm3Digest)
EFI_STATUS EFIAPI RegisterHashInterfaceLib(IN HASH_INTERFACE *HashInterface)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)