Lines Matching defs:digest
56 chapMD5(char id, char *cp, char *chapSecret, unsigned char *digest)
82 MD5Final(digest, &ctx);
89 chapSHA1(char id, char *cp, char *chapSecret, unsigned char *digest)
115 SHA1_Final(digest, &ctx);
123 | digest length for md5 is 128bits, and for sha1 is 160bits.
124 | digest is an ASCII string which represents the bits in
131 unsigned char digest[20];
137 if(strcmp(ap, "5") == 0 && chapMD5(id, cp, chapSecret, digest) == 0)
140 if(strcmp(ap, "7") == 0 && chapSHA1(id, cp, chapSecret, digest) == 0)
145 return bin2str(encoding, digest, len);
182 char *p, *ap, *ip, *cp, *chapSecret, *digest;
196 if((digest = chapDigest(ap, ip, cp, chapSecret)) != NULL) {
197 len = str2bin(digest, &cp);
198 puke(digest, cp, len);