summaryrefslogtreecommitdiffstats
path: root/CryptoPkg/Include/Library/BaseCryptLib.h
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:53:54 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commit7c342378317039e632d9a1a5d4cf7c21aec8cb7a (patch)
tree6b34f630a779ee11db93c02cf54fa65c29716aed /CryptoPkg/Include/Library/BaseCryptLib.h
parent2b16a4fb91b9b31c0d152588f5ac51080c6c0763 (diff)
downloadedk2-7c342378317039e632d9a1a5d4cf7c21aec8cb7a.tar.gz
edk2-7c342378317039e632d9a1a5d4cf7c21aec8cb7a.tar.bz2
edk2-7c342378317039e632d9a1a5d4cf7c21aec8cb7a.zip
CryptoPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the CryptoPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Diffstat (limited to 'CryptoPkg/Include/Library/BaseCryptLib.h')
-rw-r--r--CryptoPkg/Include/Library/BaseCryptLib.h56
1 files changed, 30 insertions, 26 deletions
diff --git a/CryptoPkg/Include/Library/BaseCryptLib.h b/CryptoPkg/Include/Library/BaseCryptLib.h
index 3755cfab40..f4bc7c0d73 100644
--- a/CryptoPkg/Include/Library/BaseCryptLib.h
+++ b/CryptoPkg/Include/Library/BaseCryptLib.h
@@ -17,12 +17,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
///
/// MD5 digest size in bytes
///
-#define MD5_DIGEST_SIZE 16
+#define MD5_DIGEST_SIZE 16
///
/// SHA-1 digest size in bytes.
///
-#define SHA1_DIGEST_SIZE 20
+#define SHA1_DIGEST_SIZE 20
///
/// SHA-256 digest size in bytes
@@ -42,17 +42,17 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
///
/// SM3 digest size in bytes
///
-#define SM3_256_DIGEST_SIZE 32
+#define SM3_256_DIGEST_SIZE 32
///
/// TDES block size in bytes
///
-#define TDES_BLOCK_SIZE 8
+#define TDES_BLOCK_SIZE 8
///
/// AES block size in bytes
///
-#define AES_BLOCK_SIZE 16
+#define AES_BLOCK_SIZE 16
///
/// RSA Key Tags Definition used in RsaSetKey() function for key component identification.
@@ -68,11 +68,12 @@ typedef enum {
RsaKeyQInv ///< The CRT coefficient (== 1/q mod p)
} RSA_KEY_TAG;
-//=====================================================================================
+// =====================================================================================
// One-Way Cryptographic Hash Primitives
-//=====================================================================================
+// =====================================================================================
#ifdef ENABLE_MD5_DEPRECATED_INTERFACES
+
/**
Retrieves the size, in bytes, of the context buffer required for MD5 hash operations.
@@ -212,9 +213,11 @@ Md5HashAll (
IN UINTN DataSize,
OUT UINT8 *HashValue
);
+
#endif
#ifndef DISABLE_SHA1_DEPRECATED_INTERFACES
+
/**
Retrieves the size, in bytes, of the context buffer required for SHA-1 hash operations.
@@ -354,6 +357,7 @@ Sha1HashAll (
IN UINTN DataSize,
OUT UINT8 *HashValue
);
+
#endif
/**
@@ -880,9 +884,9 @@ Sm3HashAll (
OUT UINT8 *HashValue
);
-//=====================================================================================
+// =====================================================================================
// MAC (Message Authentication Code) Primitive
-//=====================================================================================
+// =====================================================================================
/**
Allocates and initializes one HMAC_CTX context for subsequent HMAC-SHA256 use.
@@ -1012,9 +1016,9 @@ HmacSha256Final (
OUT UINT8 *HmacValue
);
-//=====================================================================================
+// =====================================================================================
// Symmetric Cryptography Primitive
-//=====================================================================================
+// =====================================================================================
/**
Retrieves the size, in bytes, of the context buffer required for AES operations.
@@ -1139,9 +1143,9 @@ AesCbcDecrypt (
OUT UINT8 *Output
);
-//=====================================================================================
+// =====================================================================================
// Asymmetric Cryptography Primitive
-//=====================================================================================
+// =====================================================================================
/**
Allocates and initializes one RSA context for subsequent use.
@@ -1583,10 +1587,10 @@ X509GetCommonName (
RETURN_STATUS
EFIAPI
X509GetOrganizationName (
- IN CONST UINT8 *Cert,
- IN UINTN CertSize,
- OUT CHAR8 *NameBuffer OPTIONAL,
- IN OUT UINTN *NameBufferSize
+ IN CONST UINT8 *Cert,
+ IN UINTN CertSize,
+ OUT CHAR8 *NameBuffer OPTIONAL,
+ IN OUT UINTN *NameBufferSize
);
/**
@@ -1851,8 +1855,8 @@ typedef struct {
} EFI_CERT_DATA;
typedef struct {
- UINT8 CertNumber; // Number of X.509 certificate.
- //EFI_CERT_DATA CertArray[]; // An array of X.509 certificate.
+ UINT8 CertNumber; // Number of X.509 certificate.
+ // EFI_CERT_DATA CertArray[]; // An array of X.509 certificate.
} EFI_CERT_STACK;
#pragma pack()
@@ -1905,7 +1909,7 @@ Pkcs7GetSigners (
VOID
EFIAPI
Pkcs7FreeSigners (
- IN UINT8 *Certs
+ IN UINT8 *Certs
);
/**
@@ -2151,9 +2155,9 @@ ImageTimestampVerify (
OUT EFI_TIME *SigningTime
);
-//=====================================================================================
+// =====================================================================================
// DH Key Exchange Primitive
-//=====================================================================================
+// =====================================================================================
/**
Allocates and Initializes one Diffie-Hellman Context for subsequent use.
@@ -2316,9 +2320,9 @@ DhComputeKey (
IN OUT UINTN *KeySize
);
-//=====================================================================================
+// =====================================================================================
// Pseudo-Random Generation Primitive
-//=====================================================================================
+// =====================================================================================
/**
Sets up the seed value for the pseudorandom number generator.
@@ -2366,9 +2370,9 @@ RandomBytes (
IN UINTN Size
);
-//=====================================================================================
+// =====================================================================================
// Key Derivation Function Primitive
-//=====================================================================================
+// =====================================================================================
/**
Derive key data using HMAC-SHA256 based KDF.