aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_pbkdf2.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-05-10 16:10:14 +0100
committerGravatar Sadie Powell2021-05-10 20:09:55 +0100
commit73695c4fde78a2fde0ca8badc05890d4c11a0ce5 (patch)
tree04bd67979656c49d74ca13b730857997f4782a71 /src/modules/m_pbkdf2.cpp
parentUse the contents of the link data map when using the 1206 protocol. (diff)
Refactor the Base64 encoding and decoding functions.
Diffstat (limited to 'src/modules/m_pbkdf2.cpp')
-rw-r--r--src/modules/m_pbkdf2.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_pbkdf2.cpp b/src/modules/m_pbkdf2.cpp
index 7bad7c3fa..c44f4b384 100644
--- a/src/modules/m_pbkdf2.cpp
+++ b/src/modules/m_pbkdf2.cpp
@@ -49,10 +49,10 @@ class PBKDF2Hash
this->iterations = ConvToNum<unsigned int>(tok);
ss.GetToken(tok);
- this->hash = Base64ToBin(tok);
+ this->hash = Base64::Decode(tok);
ss.GetToken(tok);
- this->salt = Base64ToBin(tok);
+ this->salt = Base64::Decode(tok);
this->length = this->hash.length();
}
@@ -61,7 +61,7 @@ class PBKDF2Hash
{
if (!IsValid())
return "";
- return ConvToStr(this->iterations) + ":" + BinToBase64(this->hash) + ":" + BinToBase64(this->salt);
+ return ConvToStr(this->iterations) + ":" + Base64::Encode(this->hash) + ":" + Base64::Encode(this->salt);
}
bool IsValid()