Lines Matching refs:secret
75 * Encrypt a secret key given passwd
76 * The secret key is passed and returned in hex notation.
80 xencrypt(secret, passwd)
81 char *secret;
90 len = (int)strlen(secret) / 2;
94 (void) hex2bin(len, secret, buf);
103 (void) bin2hex(len, (unsigned char *) buf, secret);
109 * Decrypt secret key using passwd
110 * The secret key is passed and returned in hex notation.
114 xdecrypt(secret, passwd)
115 char *secret;
124 len = (int)strlen(secret) / 2;
129 (void) hex2bin(len, secret, buf);
138 (void) bin2hex(len, (unsigned char *) buf, secret);
224 * Encrypt a secret key given passwd.
225 * The secret key is passed in hex notation.
227 * secret key (NUL term, hex notation).
241 char *secret, /* in */
262 if (!secret || !keylen || !passwd || !encrypted_secret)
268 (void) memcpy(hexkeybuf, secret, hexkeybytes);
271 (void) memcpy(hexkeybuf + hexkeybytes, secret,
331 * Decrypt secret key using passwd. The decrypted secret key
332 * *overwrites* the supplied encrypted secret key.
333 * The secret key is passed and returned in hex notation.
336 * If 'do_chksum' is TRUE, the 'secret' buffer is assumed to contain
346 char *secret, /* out */
362 len = (int)strlen(secret) / 2;
368 (void) hex2bin(len, secret, buf);
386 (void) bin2hex(len, (unsigned char *) buf, secret);
391 if (memcmp(secret, &(secret[hexkeybytes]),
393 secret[0] = 0;
402 MD5Update(&md5_ctx, (unsigned char *)secret,
410 if (memcmp(&(secret[hexkeybytes]),
412 secret[0] = 0;
417 secret[hexkeybytes] = '\0';