9#include "InternalCryptLib.h"
10#include <openssl/sha.h>
12#ifndef DISABLE_SHA1_DEPRECATED_INTERFACES
29 return (
UINTN)(
sizeof (SHA_CTX));
53 if (Sha1Context ==
NULL) {
60 return (BOOLEAN)(SHA1_Init ((SHA_CTX *)Sha1Context));
80 OUT VOID *NewSha1Context
86 if ((Sha1Context ==
NULL) || (NewSha1Context ==
NULL)) {
90 CopyMem (NewSha1Context, Sha1Context,
sizeof (SHA_CTX));
116 IN OUT VOID *Sha1Context,
124 if (Sha1Context ==
NULL) {
131 if ((Data ==
NULL) && (DataSize != 0)) {
138 return (BOOLEAN)(SHA1_Update ((SHA_CTX *)Sha1Context, Data, DataSize));
164 IN OUT VOID *Sha1Context,
171 if ((Sha1Context ==
NULL) || (HashValue ==
NULL)) {
178 return (BOOLEAN)(SHA1_Final (HashValue, (SHA_CTX *)Sha1Context));
212 if (HashValue ==
NULL) {
216 if ((Data ==
NULL) && (DataSize != 0)) {
223 if (!SHA1_Init (&Context)) {
227 if (!SHA1_Update (&Context, Data, DataSize)) {
231 if (!SHA1_Final (HashValue, &Context)) {
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
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)