cram_md5.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
*
* Copyright %G% Sun Microsystems, Inc.
* All Rights Reserved
*
*
* Comments:
*
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <strings.h>
#include "sec.h"
/* text is the challenge, key is the password, digest is an allocated
buffer (min 16 chars) which will contain the resulting digest */
{
unsigned char k_ipad[65];
unsigned char k_opad[65];
unsigned char tk[16];
int i;
if (key_len > 64){
key_len = 16;
}
for (i=0; i<64; i++){
k_ipad[i] ^= 0x36;
k_opad[i] ^= 0x5c;
}
/* Perform inner MD5 */
/* Perform outer MD5 */
return;
}