Oops, now, encription and decription are separate function.
MFC after: 2 weeks
This commit is contained in:
parent
7666c3b981
commit
e0782fc24b
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user