MdePkg[all]
1.08
|
Data Structures | |
union | EFI_HASH2_OUTPUT |
struct | _EFI_HASH2_PROTOCOL |
Macros | |
#define | EFI_HASH2_SERVICE_BINDING_PROTOCOL_GUID |
#define | EFI_HASH2_PROTOCOL_GUID |
Typedefs | |
typedef struct _EFI_HASH2_PROTOCOL | EFI_HASH2_PROTOCOL |
typedef UINT8 | EFI_MD5_HASH2 [16] |
typedef UINT8 | EFI_SHA1_HASH2 [20] |
typedef UINT8 | EFI_SHA224_HASH2 [28] |
typedef UINT8 | EFI_SHA256_HASH2 [32] |
typedef UINT8 | EFI_SHA384_HASH2 [48] |
typedef UINT8 | EFI_SHA512_HASH2 [64] |
typedef EFI_STATUS(EFIAPI * | EFI_HASH2_GET_HASH_SIZE )(IN CONST EFI_HASH2_PROTOCOL *This, IN CONST EFI_GUID *HashAlgorithm, OUT UINTN *HashSize) |
typedef EFI_STATUS(EFIAPI * | EFI_HASH2_HASH )(IN CONST EFI_HASH2_PROTOCOL *This, IN CONST EFI_GUID *HashAlgorithm, IN CONST UINT8 *Message, IN UINTN MessageSize, IN OUT EFI_HASH2_OUTPUT *Hash) |
typedef EFI_STATUS(EFIAPI * | EFI_HASH2_HASH_INIT )(IN CONST EFI_HASH2_PROTOCOL *This, IN CONST EFI_GUID *HashAlgorithm) |
typedef EFI_STATUS(EFIAPI * | EFI_HASH2_HASH_UPDATE )(IN CONST EFI_HASH2_PROTOCOL *This, IN CONST UINT8 *Message, IN UINTN MessageSize) |
typedef EFI_STATUS(EFIAPI * | EFI_HASH2_HASH_FINAL )(IN CONST EFI_HASH2_PROTOCOL *This, IN OUT EFI_HASH2_OUTPUT *Hash) |
Variables | |
EFI_GUID | gEfiHash2ServiceBindingProtocolGuid |
EFI_GUID | gEfiHash2ProtocolGuid |
EFI_HASH2_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.5. EFI_HASH2_PROTOCOL as defined in UEFI 2.5. The EFI Hash2 Service Binding Protocol is used to locate hashing services support provided by a driver and to create and destroy instances of the EFI Hash2 Protocol so that a multiple drivers can use the underlying hashing services. EFI_HASH2_PROTOCOL describes hashing functions for which the algorithm-required message padding and finalization are performed by the supporting driver.
Copyright (c) 2015, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
#define EFI_HASH2_PROTOCOL_GUID |
#define EFI_HASH2_SERVICE_BINDING_PROTOCOL_GUID |
typedef EFI_STATUS(EFIAPI * EFI_HASH2_GET_HASH_SIZE)(IN CONST EFI_HASH2_PROTOCOL *This, IN CONST EFI_GUID *HashAlgorithm, OUT UINTN *HashSize) |
Returns the size of the hash which results from a specific algorithm.
[in] | This | Points to this instance of EFI_HASH2_PROTOCOL. |
[in] | HashAlgorithm | Points to the EFI_GUID which identifies the algorithm to use. |
[out] | HashSize | Holds the returned size of the algorithm's hash. |
EFI_SUCCESS | Hash size returned successfully. |
EFI_INVALID_PARAMETER | This or HashSize is NULL. |
EFI_UNSUPPORTED | The algorithm specified by HashAlgorithm is not supported by this driver or HashAlgorithm is null. |
typedef EFI_STATUS(EFIAPI * EFI_HASH2_HASH)(IN CONST EFI_HASH2_PROTOCOL *This, IN CONST EFI_GUID *HashAlgorithm, IN CONST UINT8 *Message, IN UINTN MessageSize, IN OUT EFI_HASH2_OUTPUT *Hash) |
Creates a hash for the specified message text. The hash is not extendable. The output is final with any algorithm-required padding added by the function.
[in] | This | Points to this instance of EFI_HASH2_PROTOCOL. |
[in] | HashAlgorithm | Points to the EFI_GUID which identifies the algorithm to use. |
[in] | Message | Points to the start of the message. |
[in] | MessageSize | The size of Message, in bytes. |
[in,out] | Hash | On input, points to a caller-allocated buffer of the size returned by GetHashSize() for the specified HashAlgorithm. On output, the buffer holds the resulting hash computed from the message. |
EFI_SUCCESS | Hash returned successfully. |
EFI_INVALID_PARAMETER | This or Hash is NULL. |
EFI_UNSUPPORTED | The algorithm specified by HashAlgorithm is not supported by this driver or HashAlgorithm is Null. |
EFI_OUT_OF_RESOURCES | Some resource required by the function is not available or MessageSize is greater than platform maximum. |
typedef EFI_STATUS(EFIAPI * EFI_HASH2_HASH_FINAL)(IN CONST EFI_HASH2_PROTOCOL *This, IN OUT EFI_HASH2_OUTPUT *Hash) |
Finalizes a hash operation in progress and returns calculation result. The output is final with any necessary padding added by the function. The hash may not be further updated or extended after HashFinal().
[in] | This | Points to this instance of EFI_HASH2_PROTOCOL. |
[in,out] | Hash | On input, points to a caller-allocated buffer of the size returned by GetHashSize() for the specified HashAlgorithm specified in preceding HashInit(). On output, the buffer holds the resulting hash computed from the message. |
EFI_SUCCESS | Hash returned successfully. |
EFI_INVALID_PARAMETER | This or Hash is NULL. |
EFI_NOT_READY | This call was not preceded by a valid call to HashInit() and at least one call to HashUpdate(), or the operation in progress was canceled by a call to Hash() on the same instance. |
typedef EFI_STATUS(EFIAPI * EFI_HASH2_HASH_INIT)(IN CONST EFI_HASH2_PROTOCOL *This, IN CONST EFI_GUID *HashAlgorithm) |
This function must be called to initialize a digest calculation to be subsequently performed using the EFI_HASH2_PROTOCOL functions HashUpdate() and HashFinal().
[in] | This | Points to this instance of EFI_HASH2_PROTOCOL. |
[in] | HashAlgorithm | Points to the EFI_GUID which identifies the algorithm to use. |
EFI_SUCCESS | Initialized successfully. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_UNSUPPORTED | The algorithm specified by HashAlgorithm is not supported by this driver or HashAlgorithm is Null. |
EFI_OUT_OF_RESOURCES | Process failed due to lack of required resource. |
EFI_ALREADY_STARTED | This function is called when the operation in progress is still in processing Hash(), or HashInit() is already called before and not terminated by HashFinal() yet on the same instance. |
typedef EFI_STATUS(EFIAPI * EFI_HASH2_HASH_UPDATE)(IN CONST EFI_HASH2_PROTOCOL *This, IN CONST UINT8 *Message, IN UINTN MessageSize) |
Updates the hash of a computation in progress by adding a message text.
[in] | This | Points to this instance of EFI_HASH2_PROTOCOL. |
[in] | Message | Points to the start of the message. |
[in] | MessageSize | The size of Message, in bytes. |
EFI_SUCCESS | Digest in progress updated successfully. |
EFI_INVALID_PARAMETER | This or Hash is NULL. |
EFI_OUT_OF_RESOURCES | Some resource required by the function is not available or MessageSize is greater than platform maximum. |
EFI_NOT_READY | This call was not preceded by a valid call to HashInit(), or the operation in progress was terminated by a call to Hash() or HashFinal() on the same instance. |
typedef struct _EFI_HASH2_PROTOCOL EFI_HASH2_PROTOCOL |
typedef UINT8 EFI_MD5_HASH2[16] |
typedef UINT8 EFI_SHA1_HASH2[20] |
typedef UINT8 EFI_SHA224_HASH2[28] |
typedef UINT8 EFI_SHA256_HASH2[32] |
typedef UINT8 EFI_SHA384_HASH2[48] |
typedef UINT8 EFI_SHA512_HASH2[64] |
EFI_GUID gEfiHash2ProtocolGuid |
EFI_GUID gEfiHash2ServiceBindingProtocolGuid |