Added definitions for EFI HASH PROTOCOL
Signed-off-by: Nathan Blythe <nblythe@lgsinnovations.com> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
This commit is contained in:
parent
883702e813
commit
8c29617e0b
@ -63,6 +63,7 @@ extern EFI_GUID PciIoProtocol;
|
||||
extern EFI_GUID DriverBindingProtocol;
|
||||
extern EFI_GUID ComponentNameProtocol;
|
||||
extern EFI_GUID ComponentName2Protocol;
|
||||
extern EFI_GUID HashProtocol;
|
||||
|
||||
extern EFI_GUID EfiGlobalVariable;
|
||||
extern EFI_GUID GenericFileInfo;
|
||||
|
@ -546,6 +546,76 @@ BOOLEAN
|
||||
OUT CHAR8 *Fat
|
||||
);
|
||||
|
||||
//
|
||||
// Hash Protocol
|
||||
//
|
||||
#define HASH_PROTOCOL \
|
||||
{ 0xC5184932, 0xDBA5, 0x46DB, { 0xA5, 0xBA, 0xCC, 0x0B, 0xDA, 0x9C, 0x14, 0x35 } }
|
||||
|
||||
#define EFI_HASH_ALGORITHM_SHA1 \
|
||||
{ 0x2AE9D80F, 0x3FB2, 0x4095, { 0xB7, 0xB1, 0xE9, 0x31, 0x57, 0xB9, 0x46, 0xB6 } } // Deprecated
|
||||
|
||||
#define EFI_HASH_ALGORITHM_SHA224 \
|
||||
{ 0x8DF01A06, 0x9BD5, 0x4BF7, { 0xB0, 0x21, 0xDB, 0x4F, 0xD9, 0xCC, 0xF4, 0x5B } } // Deprecated
|
||||
|
||||
#define EFI_HASH_ALGORITHM_SHA256 \
|
||||
{ 0x51AA59DE, 0xFDF2, 0x4EA3, { 0xBC, 0x63, 0x87, 0x5F, 0xB7, 0x84, 0x2E, 0xE9 } } // Deprecated
|
||||
|
||||
#define EFI_HASH_ALGORITHM_SHA384 \
|
||||
{ 0xEFA96432, 0xDE33, 0x4DD2, { 0xAE, 0xE6, 0x32, 0x8C, 0x33, 0xDF, 0x77, 0x7A } } // Deprecated
|
||||
|
||||
#define EFI_HASH_ALGORITHM_SHA512 \
|
||||
{ 0xCAA4381E, 0x750C, 0x4770, { 0xB8, 0x70, 0x7A, 0x23, 0xB4, 0xE4, 0x21, 0x30 } } // Deprecated
|
||||
|
||||
#define EFI_HASH_ALGORITHM_MD5 \
|
||||
{ 0x0AF7C79C, 0x65B5, 0x4319, { 0xB0, 0xAE, 0x44, 0xEC, 0x48, 0x4E, 0x4A, 0xD7 } } // Deprecated
|
||||
|
||||
#define EFI_HASH_ALGORITHM_SHA1_NOPAD \
|
||||
{ 0x24C5DC2F, 0x53E2, 0x40CA, { 0x9E, 0xD6, 0xA5, 0xD9, 0xA4, 0x9F, 0x46, 0x3B } }
|
||||
|
||||
#define EFI_HASH_ALGORITHM_SHA256_NOPAD \
|
||||
{ 0x8628752A, 0x6CB7, 0x4814, { 0x96, 0xFC, 0x24, 0xA8, 0x15, 0xAC, 0x22, 0x26 } }
|
||||
|
||||
|
||||
INTERFACE_DECL(_EFI_HASH);
|
||||
|
||||
typedef UINT8 EFI_MD5_HASH[16];
|
||||
typedef UINT8 EFI_SHA1_HASH[20];
|
||||
typedef UINT8 EFI_SHA224_HASH[28];
|
||||
typedef UINT8 EFI_SHA256_HASH[32];
|
||||
typedef UINT8 EFI_SHA384_HASH[48];
|
||||
typedef UINT8 EFI_SHA512_HASH[64];
|
||||
typedef union _EFI_HASH_OUTPUT {
|
||||
EFI_MD5_HASH *Md5Hash;
|
||||
EFI_SHA1_HASH *Sha1Hash;
|
||||
EFI_SHA224_HASH *Sha224Hash;
|
||||
EFI_SHA256_HASH *Sha256Hash;
|
||||
EFI_SHA384_HASH *Sha384Hash;
|
||||
EFI_SHA512_HASH *Sha512Hash;
|
||||
} EFI_HASH_OUTPUT;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_HASH_GET_HASH_SIZE) (
|
||||
IN CONST struct _EFI_HASH *This,
|
||||
IN CONST EFI_GUID *HashAlgorithm,
|
||||
OUT UINTN *HashSize);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_HASH_HASH) (
|
||||
IN CONST struct _EFI_HASH *This,
|
||||
IN CONST EFI_GUID *HashAlgorithm,
|
||||
IN BOOLEAN Extend,
|
||||
IN CONST UINT8 *Message,
|
||||
IN UINT64 MessageSize,
|
||||
IN OUT EFI_HASH_OUTPUT *Hash);
|
||||
|
||||
typedef struct _EFI_HASH {
|
||||
EFI_HASH_GET_HASH_SIZE GetHashSize;
|
||||
EFI_HASH_HASH Hash;
|
||||
} EFI_HASH;
|
||||
|
||||
|
||||
typedef struct _EFI_UNICODE_COLLATION_INTERFACE {
|
||||
|
||||
|
@ -107,6 +107,7 @@ EFI_GUID PciIoProtocol = EFI_PCI_IO_PROTOCOL;
|
||||
EFI_GUID DriverBindingProtocol = DRIVER_BINDING_PROTOCOL;
|
||||
EFI_GUID ComponentNameProtocol = COMPONENT_NAME_PROTOCOL;
|
||||
EFI_GUID ComponentName2Protocol = COMPONENT_NAME2_PROTOCOL;
|
||||
EFI_GUID HashProtocol = HASH_PROTOCOL;
|
||||
|
||||
//
|
||||
// File system information IDs
|
||||
|
Loading…
Reference in New Issue
Block a user