diff options
author | ume <ume@FreeBSD.org> | 2002-03-05 20:32:49 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2002-03-05 20:32:49 +0000 |
commit | e0782fc24bbe02997257820eca633c777e33d28d (patch) | |
tree | 95a1315dc851860171e1ab10b9774884ff51164f | |
parent | 7666c3b981c92e074d2721bee3753f0451cedad3 (diff) | |
download | FreeBSD-src-e0782fc24bbe02997257820eca633c777e33d28d.zip FreeBSD-src-e0782fc24bbe02997257820eca633c777e33d28d.tar.gz |
Oops, now, encription and decription are separate function.
MFC after: 2 weeks
-rw-r--r-- | sys/netinet6/esp_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet6/esp_core.c b/sys/netinet6/esp_core.c index f145bb1..e006b60 100644 --- a/sys/netinet6/esp_core.c +++ b/sys/netinet6/esp_core.c @@ -470,13 +470,13 @@ esp_blowfish_blockdecrypt(algo, sav, s, d) u_int8_t *s; u_int8_t *d; { - /* HOLY COW! BF_encrypt() takes values in host byteorder */ + /* HOLY COW! BF_decrypt() takes values in host byteorder */ BF_LONG t[2]; bcopy(s, t, sizeof(t)); t[0] = ntohl(t[0]); t[1] = ntohl(t[1]); - BF_encrypt(t, (BF_KEY *)sav->sched); + BF_decrypt(t, (BF_KEY *)sav->sched); t[0] = htonl(t[0]); t[1] = htonl(t[1]); bcopy(t, d, sizeof(t)); |