add encryption mode choice

This commit is contained in:
2020-03-05 10:39:00 +01:00
parent 9fb7353e08
commit 88d973a625
2 changed files with 41 additions and 18 deletions

View File

@ -25,7 +25,12 @@ test ('fail decryption', (t) => {
test ('rethrow decryption', (t) => {
const enc = crypto.encrypt_aes ('foo', 'bar');
t.throws (() => {
crypto.decrypt_aes (enc, 'baz', true);
crypto.decrypt_aes (
enc,
'baz',
crypto.encryption_mode_cbc_256,
true
);
});
});