Lines Matching defs:secret
79 * Encrypt a secret key given passwd
80 * The secret key is passed and returned in hex notation.
84 xencrypt(secret, passwd)
85 char *secret;
95 len = (int)strlen(secret) / 2;
99 (void) hex2bin(len, secret, buf);
108 (void) bin2hex(len, (unsigned char *) buf, secret);
120 * Decrypt secret key using passwd
121 * The secret key is passed and returned in hex notation.
125 xdecrypt(secret, passwd)
126 char *secret;
136 len = (int)strlen(secret) / 2;
141 (void) hex2bin(len, secret, buf);
150 (void) bin2hex(len, (unsigned char *) buf, secret);
242 * Encrypt a secret key given passwd.
243 * The secret key is passed in hex notation.
245 * secret key (NUL term, hex notation).
259 char *secret, /* in */
281 if (!secret || !keylen || !passwd || !encrypted_secret)
287 (void) memcpy(hexkeybuf, secret, hexkeybytes);
290 (void) memcpy(hexkeybuf + hexkeybytes, secret,
356 * Decrypt secret key using passwd. The decrypted secret key
357 * *overwrites* the supplied encrypted secret key.
358 * The secret key is passed and returned in hex notation.
361 * If 'do_chksum' is TRUE, the 'secret' buffer is assumed to contain
371 char *secret, /* out */
388 len = (int)strlen(secret) / 2;
394 (void) hex2bin(len, secret, buf);
412 (void) bin2hex(len, (unsigned char *) buf, secret);
417 if (memcmp(secret, &(secret[hexkeybytes]),
419 secret[0] = 0;
428 MD5Update(&md5_ctx, (unsigned char *)secret,
436 if (memcmp(&(secret[hexkeybytes]),
438 secret[0] = 0;
443 secret[hexkeybytes] = '\0';