MCPcopy Create free account
hub / github.com/davisking/dlib / md5

Function md5

dlib/md5/md5_kernel_1.cpp:249–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247
248
249 const std::string md5 (
250 const std::string& input
251 )
252 {
253 unsigned char output[16];
254 md5 (
255 reinterpret_cast<const unsigned char*>(input.data()),
256 static_cast<unsigned long>(input.size()),
257 output
258 );
259
260
261 std::stringstream temp;
262 for (int i = 0; i < 16; ++i)
263 {
264 temp.fill('0');
265 temp.width(2);
266 temp << std::hex << static_cast<unsigned int>(output[i]);
267 }
268
269 return temp.str();
270 }
271
272// ----------------------------------------------------------------------------------------
273

Callers 3

mainFunction · 0.85
md5_testFunction · 0.85
trainer.hFile · 0.85

Calls 6

scramble_blockFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45
widthMethod · 0.45
strMethod · 0.45
clearMethod · 0.45

Tested by 1

md5_testFunction · 0.68