MCPcopy Create free account
hub / github.com/catboost/catboost / End

Method End

library/cpp/digest/md5/md5.cpp:176–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176char* MD5::End(char* buf) {
177 static const char hex[] = "0123456789abcdef";
178 ui8 digest[16];
179 if (!buf)
180 buf = (char*)malloc(33);
181 if (!buf)
182 return nullptr;
183 Final(digest);
184 for (ui8 i = 0; i < MD5_HEX_DIGEST_LENGTH / 2; i++) {
185 buf[i * 2] = hex[digest[i] >> 4];
186 buf[i * 2 + 1] = hex[digest[i] & 0x0f];
187 }
188 buf[32] = '\0';
189 return buf;
190}
191
192char* MD5::End_b64(char* buf) {
193 ui8 digest[16];

Callers 6

Y_UNIT_TESTFunction · 0.45
Y_UNIT_TESTFunction · 0.45
Y_UNIT_TESTFunction · 0.45
DataMethod · 0.45
StreamMethod · 0.45
ReadDictMethod · 0.45

Calls 1

mallocFunction · 0.50

Tested by

no test coverage detected