9#include "InternalCryptLib.h"
10#include <mbedtls/sha1.h>
12#ifndef DISABLE_SHA1_DEPRECATED_INTERFACES
29 return (
UINTN)(
sizeof (mbedtls_sha1_context));
52 if (Sha1Context ==
NULL) {
56 mbedtls_sha1_init (Sha1Context);
58 Ret = mbedtls_sha1_starts (Sha1Context);
83 OUT VOID *NewSha1Context
86 if ((Sha1Context ==
NULL) || (NewSha1Context ==
NULL)) {
90 mbedtls_sha1_clone (NewSha1Context, Sha1Context);
116 IN OUT VOID *Sha1Context,
123 if (Sha1Context ==
NULL) {
127 if ((Data ==
NULL) && (DataSize != 0)) {
131 Ret = mbedtls_sha1_update (Sha1Context, Data, DataSize);
162 IN OUT VOID *Sha1Context,
168 if ((Sha1Context ==
NULL) || (HashValue ==
NULL)) {
172 Ret = mbedtls_sha1_finish (Sha1Context, HashValue);
173 mbedtls_sha1_free (Sha1Context);
209 if (HashValue ==
NULL) {
213 if ((Data ==
NULL) && (DataSize != 0)) {
217 Ret = mbedtls_sha1 (Data, DataSize, HashValue);
BOOLEAN EFIAPI Sha1Final(IN OUT VOID *Sha1Context, OUT UINT8 *HashValue)
BOOLEAN EFIAPI Sha1Duplicate(IN CONST VOID *Sha1Context, OUT VOID *NewSha1Context)
BOOLEAN EFIAPI Sha1Init(OUT VOID *Sha1Context)
BOOLEAN EFIAPI Sha1HashAll(IN CONST VOID *Data, IN UINTN DataSize, OUT UINT8 *HashValue)
UINTN EFIAPI Sha1GetContextSize(VOID)
BOOLEAN EFIAPI Sha1Update(IN OUT VOID *Sha1Context, IN CONST VOID *Data, IN UINTN DataSize)