35 switch (
PcdGet32 (PcdHashApiLibPolicy)) {
36 #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES
54 case HASH_ALG_SM3_256:
76 OUT HASH_API_CONTEXT HashContext
79 switch (
PcdGet32 (PcdHashApiLibPolicy)) {
80 #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES
98 case HASH_ALG_SM3_256:
121 IN HASH_API_CONTEXT HashContext,
122 OUT HASH_API_CONTEXT NewHashContext
125 switch (
PcdGet32 (PcdHashApiLibPolicy)) {
126 #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES
132 case HASH_ALG_SHA256:
136 case HASH_ALG_SHA384:
140 case HASH_ALG_SHA512:
144 case HASH_ALG_SM3_256:
168 IN HASH_API_CONTEXT HashContext,
173 switch (
PcdGet32 (PcdHashApiLibPolicy)) {
174 #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES
176 return Sha1Update (HashContext, DataToHash, DataToHashLen);
180 case HASH_ALG_SHA256:
181 return Sha256Update (HashContext, DataToHash, DataToHashLen);
184 case HASH_ALG_SHA384:
185 return Sha384Update (HashContext, DataToHash, DataToHashLen);
188 case HASH_ALG_SHA512:
189 return Sha512Update (HashContext, DataToHash, DataToHashLen);
192 case HASH_ALG_SM3_256:
193 return Sm3Update (HashContext, DataToHash, DataToHashLen);
215 IN HASH_API_CONTEXT HashContext,
219 switch (
PcdGet32 (PcdHashApiLibPolicy)) {
220 #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES
226 case HASH_ALG_SHA256:
230 case HASH_ALG_SHA384:
234 case HASH_ALG_SHA512:
238 case HASH_ALG_SM3_256:
239 return Sm3Final (HashContext, Digest);
267 switch (
PcdGet32 (PcdHashApiLibPolicy)) {
268 #ifndef DISABLE_SHA1_DEPRECATED_INTERFACES
270 return Sha1HashAll (DataToHash, DataToHashLen, Digest);
274 case HASH_ALG_SHA256:
278 case HASH_ALG_SHA384:
282 case HASH_ALG_SHA512:
286 case HASH_ALG_SM3_256:
287 return Sm3HashAll (DataToHash, DataToHashLen, Digest);
UINTN EFIAPI Sha256GetContextSize(VOID)
UINTN EFIAPI Sha384GetContextSize(VOID)
BOOLEAN EFIAPI Sha512HashAll(IN CONST VOID *Data, IN UINTN DataSize, OUT UINT8 *HashValue)
BOOLEAN EFIAPI Sm3Duplicate(IN CONST VOID *Sm3Context, OUT VOID *NewSm3Context)
BOOLEAN EFIAPI Sha512Final(IN OUT VOID *Sha512Context, OUT UINT8 *HashValue)
BOOLEAN EFIAPI Sha384Duplicate(IN CONST VOID *Sha384Context, OUT VOID *NewSha384Context)
UINTN EFIAPI Sm3GetContextSize(VOID)
UINTN EFIAPI Sha512GetContextSize(VOID)
BOOLEAN EFIAPI Sha1Final(IN OUT VOID *Sha1Context, OUT UINT8 *HashValue)
BOOLEAN EFIAPI Sm3Update(IN OUT VOID *Sm3Context, IN CONST VOID *Data, IN UINTN DataSize)
BOOLEAN EFIAPI Sha512Init(OUT VOID *Sha512Context)
BOOLEAN EFIAPI Sm3Final(IN OUT VOID *Sm3Context, OUT UINT8 *HashValue)
BOOLEAN EFIAPI Sha256Init(OUT VOID *Sha256Context)
BOOLEAN EFIAPI Sha1Duplicate(IN CONST VOID *Sha1Context, OUT VOID *NewSha1Context)
BOOLEAN EFIAPI Sha384HashAll(IN CONST VOID *Data, IN UINTN DataSize, OUT UINT8 *HashValue)
BOOLEAN EFIAPI Sha256Final(IN OUT VOID *Sha256Context, OUT UINT8 *HashValue)
BOOLEAN EFIAPI Sm3HashAll(IN CONST VOID *Data, IN UINTN DataSize, OUT UINT8 *HashValue)
BOOLEAN EFIAPI Sha384Update(IN OUT VOID *Sha384Context, IN CONST VOID *Data, IN UINTN DataSize)
BOOLEAN EFIAPI Sha256Duplicate(IN CONST VOID *Sha256Context, OUT VOID *NewSha256Context)
BOOLEAN EFIAPI Sm3Init(OUT VOID *Sm3Context)
BOOLEAN EFIAPI Sha1Init(OUT VOID *Sha1Context)
BOOLEAN EFIAPI Sha256HashAll(IN CONST VOID *Data, IN UINTN DataSize, OUT UINT8 *HashValue)
BOOLEAN EFIAPI Sha512Duplicate(IN CONST VOID *Sha512Context, OUT VOID *NewSha512Context)
BOOLEAN EFIAPI Sha256Update(IN OUT VOID *Sha256Context, IN CONST VOID *Data, IN UINTN DataSize)
BOOLEAN EFIAPI Sha1HashAll(IN CONST VOID *Data, IN UINTN DataSize, OUT UINT8 *HashValue)
UINTN EFIAPI Sha1GetContextSize(VOID)
BOOLEAN EFIAPI Sha384Final(IN OUT VOID *Sha384Context, OUT UINT8 *HashValue)
BOOLEAN EFIAPI Sha384Init(OUT VOID *Sha384Context)
BOOLEAN EFIAPI Sha512Update(IN OUT VOID *Sha512Context, IN CONST VOID *Data, IN UINTN DataSize)
BOOLEAN EFIAPI Sha1Update(IN OUT VOID *Sha1Context, IN CONST VOID *Data, IN UINTN DataSize)
BOOLEAN EFIAPI HashApiUpdate(IN HASH_API_CONTEXT HashContext, IN VOID *DataToHash, IN UINTN DataToHashLen)
BOOLEAN EFIAPI HashApiDuplicate(IN HASH_API_CONTEXT HashContext, OUT HASH_API_CONTEXT NewHashContext)
BOOLEAN EFIAPI HashApiFinal(IN HASH_API_CONTEXT HashContext, OUT UINT8 *Digest)
UINTN EFIAPI HashApiGetContextSize(VOID)
BOOLEAN EFIAPI HashApiHashAll(IN CONST VOID *DataToHash, IN UINTN DataToHashLen, OUT UINT8 *Digest)
BOOLEAN EFIAPI HashApiInit(OUT HASH_API_CONTEXT HashContext)
#define PcdGet32(TokenName)