avoid possible align issue
This commit is contained in:
parent
9b55c15642
commit
731744bcc2
|
@ -1,5 +1,5 @@
|
||||||
/* $NetBSD: esp_core.c,v 1.13 2000/11/02 12:25:01 itojun Exp $ */
|
/* $NetBSD: esp_core.c,v 1.14 2000/11/02 12:28:45 itojun Exp $ */
|
||||||
/* $KAME: esp_core.c,v 1.49 2000/11/02 12:21:20 itojun Exp $ */
|
/* $KAME: esp_core.c,v 1.50 2000/11/02 12:27:38 itojun Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||||
|
@ -350,7 +350,8 @@ esp_des_blockdecrypt(algo, sav, s, d)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* assumption: d has a good alignment */
|
/* assumption: d has a good alignment */
|
||||||
des_ecb_encrypt((des_cblock *)s, (des_cblock *)d,
|
bcopy(s, d, sizeof(DES_LONG) * 2);
|
||||||
|
des_ecb_encrypt((des_cblock *)d, (des_cblock *)d,
|
||||||
*(des_key_schedule *)sav->sched, DES_DECRYPT);
|
*(des_key_schedule *)sav->sched, DES_DECRYPT);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -364,9 +365,9 @@ esp_des_blockencrypt(algo, sav, s, d)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* assumption: d has a good alignment */
|
/* assumption: d has a good alignment */
|
||||||
des_ecb_encrypt((des_cblock *)s, (des_cblock *)d,
|
bcopy(s, d, sizeof(DES_LONG) * 2);
|
||||||
*(des_key_schedule *)sav->sched,
|
des_ecb_encrypt((des_cblock *)d, (des_cblock *)d,
|
||||||
DES_ENCRYPT);
|
*(des_key_schedule *)sav->sched, DES_ENCRYPT);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue