TianoCore EDK2 master
|
#include "TestBaseCryptLib.h"
Go to the source code of this file.
Data Structures | |
struct | HASH_TEST_CONTEXT |
Macros | |
#define | MAX_DIGEST_SIZE 64 |
Typedefs | |
typedef UINTN(EFIAPI * | EFI_HASH_GET_CONTEXT_SIZE) (VOID) |
typedef BOOLEAN(EFIAPI * | EFI_HASH_INIT) (OUT VOID *HashContext) |
typedef BOOLEAN(EFIAPI * | EFI_HASH_UPDATE) (IN OUT VOID *HashContext, IN CONST VOID *Data, IN UINTN DataSize) |
typedef BOOLEAN(EFIAPI * | EFI_HASH_DUP) (IN CONST VOID *HashContext, OUT VOID *NewHashContext) |
typedef BOOLEAN(EFIAPI * | EFI_HASH_FINAL) (IN OUT VOID *HashContext, OUT UINT8 *HashValue) |
typedef BOOLEAN(EFIAPI * | EFI_HASH_ALL) (IN CONST VOID *Data, IN UINTN DataSize, OUT UINT8 *HashValue) |
Functions | |
UNIT_TEST_STATUS EFIAPI | TestVerifyHashPreReq (UNIT_TEST_CONTEXT Context) |
VOID EFIAPI | TestVerifyHashCleanUp (UNIT_TEST_CONTEXT Context) |
UNIT_TEST_STATUS EFIAPI | TestVerifyHash (IN UNIT_TEST_CONTEXT Context) |
Application for Hash Primitives Validation.
Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file HashTests.c.
#define MAX_DIGEST_SIZE 64 |
Definition at line 14 of file HashTests.c.
typedef BOOLEAN(EFIAPI * EFI_HASH_ALL) (IN CONST VOID *Data, IN UINTN DataSize, OUT UINT8 *HashValue) |
Definition at line 109 of file HashTests.c.
Definition at line 95 of file HashTests.c.
Definition at line 102 of file HashTests.c.
typedef UINTN(EFIAPI * EFI_HASH_GET_CONTEXT_SIZE) (VOID) |
Definition at line 75 of file HashTests.c.
typedef BOOLEAN(EFIAPI * EFI_HASH_INIT) (OUT VOID *HashContext) |
Definition at line 81 of file HashTests.c.
typedef BOOLEAN(EFIAPI * EFI_HASH_UPDATE) (IN OUT VOID *HashContext, IN CONST VOID *Data, IN UINTN DataSize) |
Definition at line 87 of file HashTests.c.
UNIT_TEST_STATUS EFIAPI TestVerifyHash | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Definition at line 172 of file HashTests.c.
VOID EFIAPI TestVerifyHashCleanUp | ( | UNIT_TEST_CONTEXT | Context | ) |
Definition at line 158 of file HashTests.c.
UNIT_TEST_STATUS EFIAPI TestVerifyHashPreReq | ( | UNIT_TEST_CONTEXT | Context | ) |
Definition at line 139 of file HashTests.c.
GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8* HashData = "abc" |
Definition at line 19 of file HashTests.c.
TEST_DESC mHashTest[] |
Definition at line 222 of file HashTests.c.
UINTN mHashTestNum = ARRAY_SIZE (mHashTest) |
Definition at line 236 of file HashTests.c.
HASH_TEST_CONTEXT mSha1TestCtx = { SHA1_DIGEST_SIZE, Sha1GetContextSize, Sha1Init, Sha1Update, Sha1Duplicate, Sha1Final, Sha1HashAll, Sha1Digest } |
Definition at line 131 of file HashTests.c.
HASH_TEST_CONTEXT mSha256TestCtx = { SHA256_DIGEST_SIZE, Sha256GetContextSize, Sha256Init, Sha256Update, Sha256Duplicate, Sha256Final, Sha256HashAll, Sha256Digest } |
Definition at line 132 of file HashTests.c.
HASH_TEST_CONTEXT mSha384TestCtx = { SHA384_DIGEST_SIZE, Sha384GetContextSize, Sha384Init, Sha384Update, Sha384Duplicate, Sha384Final, Sha384HashAll, Sha384Digest } |
Definition at line 133 of file HashTests.c.
HASH_TEST_CONTEXT mSha512TestCtx = { SHA512_DIGEST_SIZE, Sha512GetContextSize, Sha512Init, Sha512Update, Sha512Duplicate, Sha512Final, Sha512HashAll, Sha512Digest } |
Definition at line 134 of file HashTests.c.
HASH_TEST_CONTEXT mSm3TestCtx = { SM3_256_DIGEST_SIZE, Sm3GetContextSize, Sm3Init, Sm3Update, Sm3Duplicate, Sm3Final, Sm3HashAll, Sm3Digest } |
Definition at line 135 of file HashTests.c.
GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8 Sha1Digest[SHA1_DIGEST_SIZE] |
Definition at line 33 of file HashTests.c.
GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8 Sha256Digest[SHA256_DIGEST_SIZE] |
Definition at line 41 of file HashTests.c.
GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8 Sha384Digest[SHA384_DIGEST_SIZE] |
Definition at line 49 of file HashTests.c.
GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8 Sha512Digest[SHA512_DIGEST_SIZE] |
Definition at line 58 of file HashTests.c.
GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8 Sm3Digest[SM3_256_DIGEST_SIZE] |
Definition at line 69 of file HashTests.c.