mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 12:44:45 +02:00
Fix WolfSSL_DES_ecb_encrypt().
This commit is contained in:
@@ -15803,7 +15803,7 @@ void wolfSSL_DES_ecb_encrypt(WOLFSSL_DES_cblock* desa,
|
|||||||
if (desa == NULL || key == NULL || desb == NULL || (enc != DES_ENCRYPT && enc != DES_DECRYPT)){
|
if (desa == NULL || key == NULL || desb == NULL || (enc != DES_ENCRYPT && enc != DES_DECRYPT)){
|
||||||
WOLFSSL_MSG("Bad argument passed to wolfSSL_DES_ecb_encrypt");
|
WOLFSSL_MSG("Bad argument passed to wolfSSL_DES_ecb_encrypt");
|
||||||
} else {
|
} else {
|
||||||
if (wc_Des3_SetKey(&myDes, (const byte*) key, (const byte*) NULL, enc) != 0){
|
if (wc_Des3_SetKey(&myDes, (const byte*) key, (const byte*) NULL, !enc) != 0){
|
||||||
WOLFSSL_MSG("wc_Des3_SetKey return error.");
|
WOLFSSL_MSG("wc_Des3_SetKey return error.");
|
||||||
}
|
}
|
||||||
if (enc){
|
if (enc){
|
||||||
|
Reference in New Issue
Block a user