summaryrefslogtreecommitdiff
path: root/src/mongo/crypto
diff options
context:
space:
mode:
authorJonathan Reams <jbreams@mongodb.com>2019-03-27 12:06:48 -0400
committerJonathan Reams <jbreams@mongodb.com>2019-04-06 12:40:33 -0400
commit83383eb160f904c699b399ac59ccbbf103ad6102 (patch)
treed82abc4d7f7f10181b103461c936682813787e56 /src/mongo/crypto
parent652d22504d2990b2322aefc272b489e731edd789 (diff)
downloadmongo-83383eb160f904c699b399ac59ccbbf103ad6102.tar.gz
SERVER-40356 Make ConstDataRange constructable from any byte-like type
Diffstat (limited to 'src/mongo/crypto')
-rw-r--r--src/mongo/crypto/sha_block.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mongo/crypto/sha_block.h b/src/mongo/crypto/sha_block.h
index e9a0ce338b9..2d2c3684e07 100644
--- a/src/mongo/crypto/sha_block.h
+++ b/src/mongo/crypto/sha_block.h
@@ -88,7 +88,7 @@ public:
* Computes a hash of 'input' from one buffer.
*/
static SHABlock computeHash(const uint8_t* input, size_t inputLen) {
- return computeHash({ConstDataRange(reinterpret_cast<const char*>(input), inputLen)});
+ return computeHash({ConstDataRange(input, inputLen)});
}
/**
@@ -99,8 +99,7 @@ public:
const uint8_t* input,
size_t inputLen) {
SHABlock output;
- SHABlock::computeHmac(
- key, keyLen, {ConstDataRange(reinterpret_cast<const char*>(input), inputLen)}, &output);
+ SHABlock::computeHmac(key, keyLen, {ConstDataRange(input, inputLen)}, &output);
return output;
}
@@ -113,8 +112,7 @@ public:
const uint8_t* input,
size_t inputLen,
SHABlock* const output) {
- SHABlock::computeHmac(
- key, keyLen, {ConstDataRange(reinterpret_cast<const char*>(input), inputLen)}, output);
+ SHABlock::computeHmac(key, keyLen, {ConstDataRange(input, inputLen)}, output);
}
static SHABlock computeHmac(const uint8_t* key,