add rethrow option
This commit is contained in:
@ -22,6 +22,13 @@ test ('fail decryption', (t) => {
|
||||
t.is (dec, null);
|
||||
});
|
||||
|
||||
test ('rethrow decryption', (t) => {
|
||||
const enc = crypto.encrypt_aes ('foo', 'bar');
|
||||
t.throws (() => {
|
||||
const dec = crypto.decrypt_aes (enc, 'baz', true);
|
||||
});
|
||||
});
|
||||
|
||||
test ('unique crypto strings', (t) => {
|
||||
const enc = [
|
||||
crypto.encrypt_aes ('foo', 'bar'),
|
||||
|
Reference in New Issue
Block a user