Generate an MD4 hash created from the combination of the password * and the challenge string and return it base64-encoded. */
| 83 | /* Generate an MD4 hash created from the combination of the password |
| 84 | * and the challenge string and return it base64-encoded. */ |
| 85 | static void generate_hash(const char *in, const char *challenge, char *out) |
| 86 | { |
| 87 | char buf[MAX_DIGEST_LEN]; |
| 88 | int len; |
| 89 | |
| 90 | len = sum_init(valid_auth_checksums.negotiated_nni, 0); |
| 91 | sum_update(in, strlen(in)); |
| 92 | sum_update(challenge, strlen(challenge)); |
| 93 | sum_end(buf); |
| 94 | |
| 95 | base64_encode(buf, len, out, 0); |
| 96 | } |
| 97 | |
| 98 | /* Return the secret for a user from the secret file, null terminated. |
| 99 | * Maximum length is len (not counting the null). */ |
no test coverage detected