MCPcopy Index your code
hub / github.com/RsyncProject/rsync / generate_hash

Function generate_hash

authenticate.c:85–96  ·  view source on GitHub ↗

Generate an MD4 hash created from the combination of the password * and the challenge string and return it base64-encoded. */

Source from the content-addressed store, hash-verified

83/* Generate an MD4 hash created from the combination of the password
84 * and the challenge string and return it base64-encoded. */
85static 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). */

Callers 2

check_secretFunction · 0.85
auth_clientFunction · 0.85

Calls 4

sum_initFunction · 0.85
sum_updateFunction · 0.85
sum_endFunction · 0.85
base64_encodeFunction · 0.85

Tested by

no test coverage detected