add encryption mode cbc_256_quick
This commit is contained in:
		| @@ -39,6 +39,29 @@ test ('decryption 128', (t) => { | ||||
|   t.is (dec, 'foo'); | ||||
| }); | ||||
|  | ||||
| test ('encryption 256_quick', (t) => { | ||||
|   const enc = crypto.encrypt_aes ( | ||||
|     'foo', | ||||
|     'bar', | ||||
|     crypto.encryption_mode_cbc_256_quick | ||||
|   ); | ||||
|   t.is (typeof enc, 'string'); | ||||
| }); | ||||
|  | ||||
| test ('decryption 256_quick', (t) => { | ||||
|   const enc = crypto.encrypt_aes ( | ||||
|     'foo', | ||||
|     'bar', | ||||
|     crypto.encryption_mode_cbc_256_quick | ||||
|   ); | ||||
|   const dec = crypto.decrypt_aes ( | ||||
|     enc, | ||||
|     'bar', | ||||
|     crypto.encryption_mode_cbc_256_quick | ||||
|   ); | ||||
|   t.is (dec, 'foo'); | ||||
| }); | ||||
|  | ||||
| test ('fail decryption', (t) => { | ||||
|   const enc = crypto.encrypt_aes ('foo', 'bar'); | ||||
|   const dec = crypto.decrypt_aes (enc, 'baz'); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user