forked from wolfSSL/wolfssl
DES_set_odd_parity to MLB
This commit is contained in:
committed by
Jacob Barthelmeh
parent
a3ad8c5bae
commit
c80cadb25f
@@ -20392,7 +20392,7 @@ void wolfSSL_DES_set_odd_parity(WOLFSSL_DES_cblock* myDes)
|
||||
|
||||
for (i = 0; i < sz; i++) {
|
||||
unsigned char c = *((unsigned char*)myDes + i);
|
||||
if (((c & 0x01) ^
|
||||
if ((
|
||||
((c >> 1) & 0x01) ^
|
||||
((c >> 2) & 0x01) ^
|
||||
((c >> 3) & 0x01) ^
|
||||
@@ -20401,7 +20401,7 @@ void wolfSSL_DES_set_odd_parity(WOLFSSL_DES_cblock* myDes)
|
||||
((c >> 6) & 0x01) ^
|
||||
((c >> 7) & 0x01)) != 1) {
|
||||
WOLFSSL_MSG("Setting odd parity bit");
|
||||
*((unsigned char*)myDes + i) = *((unsigned char*)myDes + i) | 0x80;
|
||||
*((unsigned char*)myDes + i) = *((unsigned char*)myDes + i) | 0x01;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user