diff options
Diffstat (limited to 'CryptoPkg')
-rw-r--r-- | CryptoPkg/Library/BaseCryptLib/Hash/CryptSha512.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/Hash/CryptSha512.c b/CryptoPkg/Library/BaseCryptLib/Hash/CryptSha512.c index 59e5708..2ab7188 100644 --- a/CryptoPkg/Library/BaseCryptLib/Hash/CryptSha512.c +++ b/CryptoPkg/Library/BaseCryptLib/Hash/CryptSha512.c @@ -204,6 +204,8 @@ Sha384HashAll ( OUT UINT8 *HashValue
)
{
+ SHA512_CTX Context;
+
//
// Check input parameters.
//
@@ -218,11 +220,19 @@ Sha384HashAll ( //
// OpenSSL SHA-384 Hash Computation.
//
- if (SHA384 (Data, DataSize, HashValue) == NULL) {
+ if (!SHA384_Init (&Context)) {
+ return FALSE;
+ }
+
+ if (!SHA384_Update (&Context, Data, DataSize)) {
return FALSE;
- } else {
- return TRUE;
}
+
+ if (!SHA384_Final (HashValue, &Context)) {
+ return FALSE;
+ }
+
+ return TRUE;
}
/**
|