Oops, now, encription and decription are separate function.
MFC after: 2 weeks
This commit is contained in:
parent
d60f44583f
commit
78a5107fda
@ -470,13 +470,13 @@ esp_blowfish_blockdecrypt(algo, sav, s, d)
|
|||||||
u_int8_t *s;
|
u_int8_t *s;
|
||||||
u_int8_t *d;
|
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];
|
BF_LONG t[2];
|
||||||
|
|
||||||
bcopy(s, t, sizeof(t));
|
bcopy(s, t, sizeof(t));
|
||||||
t[0] = ntohl(t[0]);
|
t[0] = ntohl(t[0]);
|
||||||
t[1] = ntohl(t[1]);
|
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[0] = htonl(t[0]);
|
||||||
t[1] = htonl(t[1]);
|
t[1] = htonl(t[1]);
|
||||||
bcopy(t, d, sizeof(t));
|
bcopy(t, d, sizeof(t));
|
||||||
|
Loading…
Reference in New Issue
Block a user