| 1535 | } |
| 1536 | |
| 1537 | const char *genpwdhash(const char *name, const char *pwd, int salt) |
| 1538 | { |
| 1539 | static string temp; |
| 1540 | formatstring(temp)("%s %d %s %s %d", pwd, salt, name, pwd, iabs(PROTOCOL_VERSION)); |
| 1541 | tiger::hashval hash; |
| 1542 | tiger::hash((uchar *)temp, (int)strlen(temp), hash); |
| 1543 | formatstring(temp)("%s %s %s", hashchunktoa(hash.chunks[0]), hashchunktoa(hash.chunks[1]), hashchunktoa(hash.chunks[2])); |
| 1544 | return temp; |
| 1545 | } |
| 1546 | |
| 1547 | |
| 1548 |
no test coverage detected