MdePkg/Include/Protocol/Hash2.h File Reference


Data Structures

union  EFI_HASH2_OUTPUT
struct  _EFI_HASH2_PROTOCOL

Defines

#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

Detailed Description

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.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.


Define Documentation

#define EFI_HASH2_PROTOCOL_GUID

Value:

{ \
    0x55b1d734, 0xc5e1, 0x49db, { 0x96, 0x47, 0xb1, 0x6a, 0xfb, 0xe, 0x30, 0x5b } \
  }

#define EFI_HASH2_SERVICE_BINDING_PROTOCOL_GUID

Value:

{ \
    0xda836f8d, 0x217f, 0x4ca0, { 0x99, 0xc2, 0x1c, 0xa4, 0xe1, 0x60, 0x77, 0xea } \
  }


Typedef Documentation

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.

Parameters:
[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.
Return values:
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.

Parameters:
[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.
Return values:
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().

Parameters:
[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.
Return values:
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().

Parameters:
[in] This Points to this instance of EFI_HASH2_PROTOCOL.
[in] HashAlgorithm Points to the EFI_GUID which identifies the algorithm to use.
Return values:
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.

Parameters:
[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.
Return values:
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 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]


Variable Documentation


Generated on Wed Sep 23 16:24:23 2015 for MdePkg[ALL] by  doxygen 1.5.7.1