]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256.c
CryptoPkg: Apply uncrustify changes
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Hmac / CryptHmacSha256.c
index 3fdef064f93a4e80ffcfc79674b685aaa1962c6b..7e83551c1b22fc51fbc45610fe10bec64b03b161 100644 (file)
@@ -25,7 +25,7 @@ HmacSha256New (
   //\r
   // Allocates & Initializes HMAC_CTX Context by OpenSSL HMAC_CTX_new()\r
   //\r
-  return (VOID *) HMAC_CTX_new ();\r
+  return (VOID *)HMAC_CTX_new ();\r
 }\r
 \r
 /**\r
@@ -71,11 +71,11 @@ HmacSha256SetKey (
   //\r
   // Check input parameters.\r
   //\r
-  if (HmacSha256Context == NULL || KeySize > INT_MAX) {\r
+  if ((HmacSha256Context == NULL) || (KeySize > INT_MAX)) {\r
     return FALSE;\r
   }\r
 \r
-  if (HMAC_Init_ex ((HMAC_CTX *)HmacSha256Context, Key, (UINT32) KeySize, EVP_sha256(), NULL) != 1) {\r
+  if (HMAC_Init_ex ((HMAC_CTX *)HmacSha256Context, Key, (UINT32)KeySize, EVP_sha256 (), NULL) != 1) {\r
     return FALSE;\r
   }\r
 \r
@@ -105,7 +105,7 @@ HmacSha256Duplicate (
   //\r
   // Check input parameters.\r
   //\r
-  if (HmacSha256Context == NULL || NewHmacSha256Context == NULL) {\r
+  if ((HmacSha256Context == NULL) || (NewHmacSha256Context == NULL)) {\r
     return FALSE;\r
   }\r
 \r
@@ -152,7 +152,7 @@ HmacSha256Update (
   //\r
   // Check invalid parameters, in case that only DataLength was checked in OpenSSL\r
   //\r
-  if (Data == NULL && DataSize != 0) {\r
+  if ((Data == NULL) && (DataSize != 0)) {\r
     return FALSE;\r
   }\r
 \r
@@ -198,7 +198,7 @@ HmacSha256Final (
   //\r
   // Check input parameters.\r
   //\r
-  if (HmacSha256Context == NULL || HmacValue == NULL) {\r
+  if ((HmacSha256Context == NULL) || (HmacValue == NULL)) {\r
     return FALSE;\r
   }\r
 \r
@@ -208,6 +208,7 @@ HmacSha256Final (
   if (HMAC_Final ((HMAC_CTX *)HmacSha256Context, HmacValue, &Length) != 1) {\r
     return FALSE;\r
   }\r
+\r
   if (HMAC_CTX_reset ((HMAC_CTX *)HmacSha256Context) != 1) {\r
     return FALSE;\r
   }\r