summaryrefslogtreecommitdiff
path: root/src/mongo/crypto
diff options
context:
space:
mode:
authorDaniel Moody <daniel.moody@mongodb.com>2021-07-29 15:28:20 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-02 23:52:53 +0000
commit27f328ad14b8fbc006c5c4103becd0f6a3aaaa5c (patch)
treedf483a3165f012efe9c395e4bae67aa8097fe1ab /src/mongo/crypto
parenteae9041c1c1320a15a6b13f3f1d4770a2b96e085 (diff)
downloadmongo-27f328ad14b8fbc006c5c4103becd0f6a3aaaa5c.tar.gz
SERVER-57446 fix clang-tidy header issues and add header-filter
Diffstat (limited to 'src/mongo/crypto')
-rw-r--r--src/mongo/crypto/aead_encryption.h15
-rw-r--r--src/mongo/crypto/sha1_block.h4
-rw-r--r--src/mongo/crypto/sha256_block.h4
-rw-r--r--src/mongo/crypto/sha512_block.h4
4 files changed, 12 insertions, 15 deletions
diff --git a/src/mongo/crypto/aead_encryption.h b/src/mongo/crypto/aead_encryption.h
index 0b20291dd88..d8abd1b4e38 100644
--- a/src/mongo/crypto/aead_encryption.h
+++ b/src/mongo/crypto/aead_encryption.h
@@ -70,20 +70,17 @@ Status aeadDecryptDataFrame(FLEDecryptionFrame& dataframe);
* Uses AEAD_AES_256_CBC_HMAC_SHA_512 encryption to encrypt a local datakey.
* Writes output to out.
*/
-Status aeadEncryptLocalKMS(const SymmetricKey& key,
- const ConstDataRange in,
- uint8_t* out,
- size_t outLen);
+Status aeadEncryptLocalKMS(const SymmetricKey& key, ConstDataRange in, uint8_t* out, size_t outLen);
/**
* Internal calls for the aeadEncryption algorithm. Only used for testing.
*/
Status aeadEncryptWithIV(ConstDataRange key,
const uint8_t* in,
- const size_t inLen,
+ size_t inLen,
const uint8_t* iv,
- const size_t ivLen,
+ size_t ivLen,
const uint8_t* associatedData,
- const uint64_t associatedDataLen,
+ uint64_t associatedDataLen,
ConstDataRange dataLenBitsEncodedStorage,
uint8_t* out,
size_t outLen);
@@ -94,7 +91,7 @@ Status aeadEncryptWithIV(ConstDataRange key,
Status aeadDecrypt(const SymmetricKey& key,
ConstDataRange ciphertext,
const uint8_t* associatedData,
- const uint64_t associatedDataLen,
+ uint64_t associatedDataLen,
uint8_t* out,
size_t* outLen);
@@ -103,7 +100,7 @@ Status aeadDecrypt(const SymmetricKey& key,
* to out.
*/
Status aeadDecryptLocalKMS(const SymmetricKey& key,
- const ConstDataRange cipher,
+ ConstDataRange cipher,
uint8_t* out,
size_t* outLen);
diff --git a/src/mongo/crypto/sha1_block.h b/src/mongo/crypto/sha1_block.h
index bf94ad112bd..e24f339710a 100644
--- a/src/mongo/crypto/sha1_block.h
+++ b/src/mongo/crypto/sha1_block.h
@@ -43,12 +43,12 @@ struct SHA1BlockTraits {
static constexpr StringData name = "SHA1Block"_sd;
- static void computeHash(std::initializer_list<ConstDataRange> input, HashType* const output);
+ static void computeHash(std::initializer_list<ConstDataRange> input, HashType* output);
static void computeHmac(const uint8_t* key,
size_t keyLen,
std::initializer_list<ConstDataRange> input,
- HashType* const output);
+ HashType* output);
};
using SHA1Block = HashBlock<SHA1BlockTraits>;
diff --git a/src/mongo/crypto/sha256_block.h b/src/mongo/crypto/sha256_block.h
index 82f3f17f3df..606e36cf516 100644
--- a/src/mongo/crypto/sha256_block.h
+++ b/src/mongo/crypto/sha256_block.h
@@ -43,12 +43,12 @@ struct SHA256BlockTraits {
static constexpr StringData name = "SHA256Block"_sd;
- static void computeHash(std::initializer_list<ConstDataRange> input, HashType* const output);
+ static void computeHash(std::initializer_list<ConstDataRange> input, HashType* output);
static void computeHmac(const uint8_t* key,
size_t keyLen,
std::initializer_list<ConstDataRange> input,
- HashType* const output);
+ HashType* output);
};
using SHA256Block = HashBlock<SHA256BlockTraits>;
diff --git a/src/mongo/crypto/sha512_block.h b/src/mongo/crypto/sha512_block.h
index 75f2b6dd1bf..58b0e1c1d16 100644
--- a/src/mongo/crypto/sha512_block.h
+++ b/src/mongo/crypto/sha512_block.h
@@ -45,12 +45,12 @@ struct SHA512BlockTraits {
static HashType computeHash(std::initializer_list<ConstDataRange> input);
- static void computeHash(std::initializer_list<ConstDataRange> input, HashType* const output);
+ static void computeHash(std::initializer_list<ConstDataRange> input, HashType* output);
static void computeHmac(const uint8_t* key,
size_t keyLen,
std::initializer_list<ConstDataRange> input,
- HashType* const output);
+ HashType* output);
};
using SHA512Block = HashBlock<SHA512BlockTraits>;