*** DES.xs-dist Wed Feb 2 17:22:38 2000 --- DES.xs Wed Feb 2 17:28:33 2000 *************** *** 23,29 **** if (key_len != sizeof(des_user_key)) croak("Invalid key"); ! des_expand_key((u_int8_t *)key, ks); ST(0) = sv_2mortal(newSVpv((char *)ks, sizeof(ks))); } --- 23,29 ---- if (key_len != sizeof(des_user_key)) croak("Invalid key"); ! perl_des_expand_key((u_int8_t *)key, ks); ST(0) = sv_2mortal(newSVpv((char *)ks, sizeof(ks))); } *************** *** 54,60 **** if (!SvUPGRADE(output, SVt_PV)) croak("cannot use output argument as lvalue"); ! des_crypt((u_int32_t *)input, (u_int32_t *)SvGROW(output, output_len), (u_int32_t *)ks, enc_flag); SvCUR_set(output, output_len); *SvEND(output) = '\0'; --- 54,60 ---- if (!SvUPGRADE(output, SVt_PV)) croak("cannot use output argument as lvalue"); ! perl_des_crypt((u_int32_t *)input, (u_int32_t *)SvGROW(output, output_len), (u_int32_t *)ks, enc_flag); SvCUR_set(output, output_len); *SvEND(output) = '\0'; *** des.c-dist Wed Feb 2 17:17:16 2000 --- des.c Wed Feb 2 17:22:28 2000 *************** *** 434,440 **** void ! des_crypt(des_cblock input, des_cblock output, des_ks ks, int encrypt) { static unsigned long l,r,t,u; #ifdef ALT_ECB --- 434,440 ---- void ! perl_des_crypt(des_cblock input, des_cblock output, des_ks ks, int encrypt) { static unsigned long l,r,t,u; #ifdef ALT_ECB *************** *** 510,516 **** } void ! des_expand_key(des_user_key userKey, des_ks ks) { static unsigned long c,d,t,s; static unsigned char * in; --- 510,516 ---- } void ! perl_des_expand_key(des_user_key userKey, des_ks ks) { static unsigned long c,d,t,s; static unsigned char * in; *** des.h-dist Wed Feb 2 17:17:12 2000 --- des.h Wed Feb 2 17:20:04 2000 *************** *** 1,5 **** --- 1,8 ---- #include + typedef unsigned char u_int8_t; + typedef unsigned long u_int32_t; + typedef u_int8_t des_user_key[8]; typedef u_int32_t des_cblock[2]; typedef u_int32_t des_ks[32];