MCPcopy Create free account
hub / github.com/assaultcube/AC / hashchunktoa

Function hashchunktoa

source/src/crypto.cpp:1522–1535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1520/////////////////// misc helper functions ////////////////////////////////////////////////////////////////
1521
1522static const char *hashchunktoa(tiger::chunk h) // portable solution instead of printf("%llx")
1523{ // use next protocol bump to switch to hashstring() above!
1524 static string buf;
1525 static int bufidx;
1526 bufidx = (bufidx + 1) & 0x3;
1527 char *s = buf + (bufidx * 33) + 33;
1528 *s-- = '\0';
1529 while(h)
1530 {
1531 *s-- = "0123456789abcdef"[h & 0xf];
1532 h >>= 4;
1533 }
1534 return s + 1;
1535}
1536
1537const char *genpwdhash(const char *name, const char *pwd, int salt)
1538{

Callers 1

genpwdhashFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected