summaryrefslogtreecommitdiff
path: root/src/mongo/crypto/mechanism_scram.h
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2019-12-18 00:10:44 +0000
committerevergreen <evergreen@mongodb.com>2019-12-18 00:10:44 +0000
commit44502cd851185934b108920cb82cfe0ced621f5f (patch)
treed9a0ec751dee655c1ff27be7ca712244c278906f /src/mongo/crypto/mechanism_scram.h
parent176cc95d069b1d8a48bebca7872f293d014936f5 (diff)
downloadmongo-44502cd851185934b108920cb82cfe0ced621f5f.tar.gz
SERVER-45057 make base64 encode/decode 22x/15x faster
Diffstat (limited to 'src/mongo/crypto/mechanism_scram.h')
-rw-r--r--src/mongo/crypto/mechanism_scram.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/crypto/mechanism_scram.h b/src/mongo/crypto/mechanism_scram.h
index 5e0265679ea..9c1fc91217d 100644
--- a/src/mongo/crypto/mechanism_scram.h
+++ b/src/mongo/crypto/mechanism_scram.h
@@ -284,7 +284,7 @@ public:
Secrets<HashBlock, MemoryPolicy> secrets(
Presecrets<HashBlock>(password, salt, iterationCount));
const auto encodedSalt =
- base64::encode(reinterpret_cast<const char*>(salt.data()), salt.size());
+ base64::encode(StringData(reinterpret_cast<const char*>(salt.data()), salt.size()));
return BSON(kIterationCountFieldName
<< iterationCount << kSaltFieldName << encodedSalt << kStoredKeyFieldName
<< secrets.storedKey().toString() << kServerKeyFieldName