mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Merge branch 'IV-length-Error' of https://github.com/Storms-Engineering/CyberChef into Storms-Engineering-IV-length-Error
This commit is contained in:
commit
011dc09d5e
3 changed files with 12 additions and 2 deletions
|
@ -73,6 +73,11 @@ class DESDecrypt extends Operation {
|
||||||
DES uses a key length of 8 bytes (64 bits).
|
DES uses a key length of 8 bytes (64 bits).
|
||||||
Triple DES uses a key length of 24 bytes (192 bits).`);
|
Triple DES uses a key length of 24 bytes (192 bits).`);
|
||||||
}
|
}
|
||||||
|
if (iv.length !== 8) {
|
||||||
|
throw new OperationError(`Invalid IV length: ${iv.length} bytes
|
||||||
|
|
||||||
|
DES uses an IV length of 8 bytes (64 bits).`);
|
||||||
|
}
|
||||||
|
|
||||||
input = Utils.convertToByteString(input, inputType);
|
input = Utils.convertToByteString(input, inputType);
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,11 @@ class DESEncrypt extends Operation {
|
||||||
DES uses a key length of 8 bytes (64 bits).
|
DES uses a key length of 8 bytes (64 bits).
|
||||||
Triple DES uses a key length of 24 bytes (192 bits).`);
|
Triple DES uses a key length of 24 bytes (192 bits).`);
|
||||||
}
|
}
|
||||||
|
if (iv.length !== 8) {
|
||||||
|
throw new OperationError(`Invalid IV length: ${iv.length} bytes
|
||||||
|
|
||||||
|
DES uses an IV length of 8 bytes (64 bits).`);
|
||||||
|
}
|
||||||
|
|
||||||
input = Utils.convertToByteString(input, inputType);
|
input = Utils.convertToByteString(input, inputType);
|
||||||
|
|
||||||
|
|
|
@ -400,7 +400,7 @@ color: white;
|
||||||
},
|
},
|
||||||
iv: {
|
iv: {
|
||||||
string: "threetwo",
|
string: "threetwo",
|
||||||
option: "Hex",
|
option: "utf8",
|
||||||
},
|
},
|
||||||
mode: "ECB",
|
mode: "ECB",
|
||||||
});
|
});
|
||||||
|
@ -415,7 +415,7 @@ color: white;
|
||||||
},
|
},
|
||||||
iv: {
|
iv: {
|
||||||
string: "threetwo",
|
string: "threetwo",
|
||||||
option: "Hex",
|
option: "utf8",
|
||||||
},
|
},
|
||||||
mode: "ECB",
|
mode: "ECB",
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue