aes-cbc-256-encrypt-decrypt-expected.txt 744 Bytes
Newer Older
ap@apple.com's avatar
ap@apple.com committed
1 2 3 4 5 6 7 8
Test AES-CBC encrypt and decrypt functions with a 256 bit key.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


Importing a raw AES key from string literal...
PASS key.type is 'secret'
PASS key.extractable is true
9
PASS key.algorithm.name is 'AES-CBC'
ap@apple.com's avatar
ap@apple.com committed
10
PASS key.algorithm.length is 256
11
PASS key.usages is ['decrypt', 'encrypt']
ap@apple.com's avatar
ap@apple.com committed
12
Using the key to encrypt plaintext...
ap@apple.com's avatar
ap@apple.com committed
13
PASS bytesToHexString(new Uint8Array(encryptionResult)) is 'f58c4c04d6e5f1ba779eabfb5f7bfbd69cfc4e967edb808d679f777bc6702c7d39f23369a9d9bacfa530e26304231461b2eb05e2c39be9fcda6c19078c6a9d1b3f461796d6b0d6b2e0c2a72b4d80e644'
ap@apple.com's avatar
ap@apple.com committed
14 15 16 17 18 19
Decrypting it back...
PASS new Uint8Array(decryptionResult) is plaintext
PASS successfullyParsed is true

TEST COMPLETE