aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/digest/md5/md5.cpp
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/digest/md5/md5.cpp
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
downloadydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/digest/md5/md5.cpp')
-rw-r--r--library/cpp/digest/md5/md5.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/digest/md5/md5.cpp b/library/cpp/digest/md5/md5.cpp
index 60eda2abea..24a5b69eef 100644
--- a/library/cpp/digest/md5/md5.cpp
+++ b/library/cpp/digest/md5/md5.cpp
@@ -14,7 +14,7 @@ namespace {
constexpr size_t MD5_PADDING_SHIFT = 56;
constexpr size_t MD5_HEX_DIGEST_LENGTH = 32;
- struct TMd5Stream: public IOutputStream {
+ struct TMd5Stream: public IOutputStream {
inline TMd5Stream(MD5* md5)
: M_(md5)
{
@@ -44,7 +44,7 @@ char* MD5::File(const char* filename, char* buf) {
} catch (...) {
}
- return nullptr;
+ return nullptr;
}
TString MD5::File(const TString& filename) {
@@ -61,7 +61,7 @@ char* MD5::Data(const TArrayRef<const ui8>& data, char* buf) {
return MD5().Update(data).End(buf);
}
-char* MD5::Data(const void* data, size_t len, char* buf) {
+char* MD5::Data(const void* data, size_t len, char* buf) {
return Data(MakeUnsignedArrayRef(data, len), buf);
}
@@ -76,11 +76,11 @@ TString MD5::Data(TStringBuf data) {
return Data(MakeUnsignedArrayRef(data));
}
-char* MD5::Stream(IInputStream* in, char* buf) {
+char* MD5::Stream(IInputStream* in, char* buf) {
return MD5().Update(in).End(buf);
}
-MD5& MD5::Update(IInputStream* in) {
+MD5& MD5::Update(IInputStream* in) {
TMd5Stream md5(this);
TransferData(in, &md5);
@@ -179,7 +179,7 @@ char* MD5::End(char* buf) {
if (!buf)
buf = (char*)malloc(33);
if (!buf)
- return nullptr;
+ return nullptr;
Final(digest);
for (ui8 i = 0; i < MD5_HEX_DIGEST_LENGTH / 2; i++) {
buf[i * 2] = hex[digest[i] >> 4];
@@ -194,10 +194,10 @@ char* MD5::End_b64(char* buf) {
if (!buf)
buf = (char*)malloc(25);
if (!buf)
- return nullptr;
+ return nullptr;
Final(digest);
Base64Encode(buf, digest, 16);
- buf[24] = '\0';
+ buf[24] = '\0';
return buf;
}