&cksum))
return retval;
- bcopy((char *)contents, p, CRC32_CKSUM_LENGTH);
+ memcpy(p, (char *)contents, CRC32_CKSUM_LENGTH);
return (mit_des_encrypt_f(in, out, sumsize, key, ivec));
}
cksum.contents = contents_prd;
p = (char *)out + size - CRC32_CKSUM_LENGTH;
- bcopy(p, (char *)contents_get, CRC32_CKSUM_LENGTH);
+ memcpy((char *)contents_get, p, CRC32_CKSUM_LENGTH);
bzero(p, CRC32_CKSUM_LENGTH);
if (retval = (*krb5_cksumarray[CKSUMTYPE_CRC32]->
&cksum))
return retval;
- if ( bcmp((char *)contents_get, (char *)contents_prd, CRC32_CKSUM_LENGTH) )
+ if (memcmp((char *)contents_get, (char *)contents_prd, CRC32_CKSUM_LENGTH) )
return KRB5KRB_AP_ERR_BAD_INTEGRITY;
return 0;
if (encrypt) {
#ifdef MUSTALIGN
if ((long) ivec & 3) {
- bcopy((char *)ivec++, (char *)&t_output[0], sizeof(t_output[0]));
- bcopy((char *)ivec, (char *)&t_output[1], sizeof(t_output[1]));
+ memcpy((char *)&t_output[0], (char *)ivec++, sizeof(t_output[0]));
+ memcpy((char *)&t_output[1], (char *)ivec, sizeof(t_output[1]));
}
else
#endif
/* get input */
#ifdef MUSTALIGN
if ((long) input & 3) {
- bcopy((char *)input++,(char *)&t_input[0],sizeof(t_input[0]));
- bcopy((char *)input++,(char *)&t_input[1],sizeof(t_input[1]));
+ memcpy((char *)&t_input[0],(char *)input++,sizeof(t_input[0]));
+ memcpy((char *)&t_input[1],(char *)input++,sizeof(t_input[1]));
}
else
#endif
/* copy temp output and save it for cbc */
#ifdef MUSTALIGN
if ((long) output & 3) {
- bcopy((char *)&t_output[0],(char *)output++,
- sizeof(t_output[0]));
- bcopy((char *)&t_output[1],(char *)output++,
- sizeof(t_output[1]));
+ memcpy((char *)output++,(char *)&t_output[0],
+ sizeof(t_output[0]));
+ memcpy((char *)output++,(char *)&t_output[1],
+ sizeof(t_output[1]));
}
else
#endif
/* decrypt */
#ifdef MUSTALIGN
if ((long) ivec & 3) {
- bcopy((char *)ivec++,(char *)&xor_0,sizeof(xor_0));
- bcopy((char *)ivec,(char *)&xor_1,sizeof(xor_1));
+ memcpy((char *)&xor_0,(char *)ivec++,sizeof(xor_0));
+ memcpy((char *)&xor_1,(char *)ivec,sizeof(xor_1));
}
else
#endif
/* get input */
#ifdef MUSTALIGN
if ((long) input & 3) {
- bcopy((char *)input++,(char *)&t_input[0],sizeof(t_input[0]));
- bcopy((char *)input++,(char *)&t_input[1],sizeof(t_input[0]));
+ memcpy((char *)&t_input[0],(char *)input++,sizeof(t_input[0]));
+ memcpy((char *)&t_input[1],(char *)input++,sizeof(t_input[0]));
}
else
#endif
/* copy temp output */
#ifdef MUSTALIGN
if ((long) output & 3) {
- bcopy((char *)&t_output[0],(char *)output++,
+ memcpy((char *)output++,(char *)&t_output[0],
sizeof(t_output[0]));
- bcopy((char *)&t_output[1],(char *)output++,
+ memcpy((char *)output++,(char *)&t_output[1],
sizeof(t_output[1]));
}
else
com_err("des verify", retval, "can't finish key2");
exit(-1);
}
- if ( bcmp((char *)cipher_text, (char *)cipher1, 8) ) {
+ if ( memcmp((char *)cipher_text, (char *)cipher1, 8) ) {
printf("verify: error in ECB encryption\n");
exit(-1);
}
}
printf("\n\n");
do_decrypt(output,cipher_text);
- if ( bcmp((char *)cipher_text, (char *)cipher2, 8) ) {
+ if ( memcmp((char *)cipher_text, (char *)cipher2, 8) ) {
printf("verify: error in ECB encryption\n");
exit(-1);
}
}
printf("\tdecrypted clear_text = \"%s\"\n",clear_text);
- if ( bcmp((char *)cipher_text, (char *)cipher3, in_length) ) {
+ if ( memcmp((char *)cipher_text, (char *)cipher3, in_length) ) {
printf("verify: error in CBC encryption\n");
exit(-1);
}
com_err("des verify", retval, "can't finish key2");
exit(-1);
}
- if ( bcmp((char *)cipher_text, (char *)checksum, 8) ) {
+ if ( memcmp((char *)cipher_text, (char *)checksum, 8) ) {
printf("verify: error in CBC cheksum\n");
exit(-1);
}