TianoCore EDK2 master
Loading...
Searching...
No Matches
HashInstanceLibSha384.c File Reference

Go to the source code of this file.

Functions

VOID Tpm2SetSha384ToDigestList (IN TPML_DIGEST_VALUES *DigestList, IN UINT8 *Sha384Digest)
 
EFI_STATUS EFIAPI Sha384HashInit (OUT HASH_HANDLE *HashHandle)
 
EFI_STATUS EFIAPI Sha384HashUpdate (IN HASH_HANDLE HashHandle, IN VOID *DataToHash, IN UINTN DataToHashLen)
 
EFI_STATUS EFIAPI Sha384HashFinal (IN HASH_HANDLE HashHandle, OUT TPML_DIGEST_VALUES *DigestList)
 
EFI_STATUS EFIAPI HashInstanceLibSha384Constructor (VOID)
 

Variables

HASH_INTERFACE mSha384InternalHashInstance
 

Detailed Description

This library is BaseCrypto SHA384 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 HashInstanceLibSha384.c.

Function Documentation

◆ HashInstanceLibSha384Constructor()

EFI_STATUS EFIAPI HashInstanceLibSha384Constructor ( VOID  )

The function register SHA384 instance.

Return values
EFI_SUCCESSSHA384 instance is registered, or system does not support register SHA384 instance

Definition at line 135 of file HashInstanceLibSha384.c.

◆ Sha384HashFinal()

EFI_STATUS EFIAPI Sha384HashFinal ( IN HASH_HANDLE  HashHandle,
OUT TPML_DIGEST_VALUES DigestList 
)

Complete hash sequence complete.

Parameters
HashHandleHash handle.
DigestListDigest list.
Return values
EFI_SUCCESSHash sequence complete and DigestList is returned.

Definition at line 103 of file HashInstanceLibSha384.c.

◆ Sha384HashInit()

EFI_STATUS EFIAPI Sha384HashInit ( OUT HASH_HANDLE *  HashHandle)

Start hash sequence.

Parameters
HashHandleHash handle.
Return values
EFI_SUCCESSHash sequence start and HandleHandle returned.
EFI_OUT_OF_RESOURCESNo enough resource to start hash.

Definition at line 50 of file HashInstanceLibSha384.c.

◆ Sha384HashUpdate()

EFI_STATUS EFIAPI Sha384HashUpdate ( IN HASH_HANDLE  HashHandle,
IN VOID *  DataToHash,
IN UINTN  DataToHashLen 
)

Update hash sequence data.

Parameters
HashHandleHash handle.
DataToHashData to be hashed.
DataToHashLenData size.
Return values
EFI_SUCCESSHash sequence updated.

Definition at line 79 of file HashInstanceLibSha384.c.

◆ Tpm2SetSha384ToDigestList()

VOID Tpm2SetSha384ToDigestList ( IN TPML_DIGEST_VALUES DigestList,
IN UINT8 *  Sha384Digest 
)

The function set SHA384 to digest list.

Parameters
DigestListdigest list
Sha384DigestSHA384 digest

Definition at line 26 of file HashInstanceLibSha384.c.

Variable Documentation

◆ mSha384InternalHashInstance

HASH_INTERFACE mSha384InternalHashInstance
Initial value:
= {
HASH_ALGORITHM_SHA384_GUID,
}
EFI_STATUS EFIAPI Sha384HashUpdate(IN HASH_HANDLE HashHandle, IN VOID *DataToHash, IN UINTN DataToHashLen)
EFI_STATUS EFIAPI Sha384HashInit(OUT HASH_HANDLE *HashHandle)
EFI_STATUS EFIAPI Sha384HashFinal(IN HASH_HANDLE HashHandle, OUT TPML_DIGEST_VALUES *DigestList)

Definition at line 121 of file HashInstanceLibSha384.c.