blob: 2bb5312c3fa479191d19cb256f4623c7eb43e63d [file] [log] [blame]
Tests algorithm normalization.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS algorithm.name is 'SHA-1'
PASS algorithm.name is 'SHA-256'
PASS normalizeDigest({}) threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS normalizeDigest({name: null}) threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS normalizeDigest({name: -1}) threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS normalizeDigest({name: ''}) threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS normalizeDigest({name: 'nosuchalgorithm'}) threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS normalizeDigest({name: '\u0189'}) threw exception SyntaxError: An invalid or illegal string was specified..
PASS normalizeDigest(null) threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS normalizeDigest(0) threw exception TypeError: Not an object..
PASS normalizeDigest(undefined) threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS normalizeDigest('') threw exception TypeError: Not an object..
PASS algorithm.noSuchParam is undefined.
PASS algorithm.name is 'AES-CBC'
PASS algorithm.iv.length is 16
PASS algorithm.iv[3] is 3
PASS algorithm.iv[3] is 3
PASS normalizeEncrypt(rawAlgorithm) threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS algorithm.name is 'SHA-384'
PASS algorithm.name is 'SHA-384'
PASS algorithm.name is 'AES-CBC'
PASS algorithm.iv.length is 16
PASS algorithm.iv[1] is 1
PASS algorithm.name is 'AES-CBC'
PASS algorithm.iv.length is 16
PASS algorithm.iv[1] is 1
PASS normalizeEncrypt({ name: 'SHA-1' }) threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS normalizeDigest({ name: 'AES-CBC', iv: originalIv }) threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS normalizeSign({name: 'hmac'}) threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS normalizeSign({name: 'hmac', hash: 'foo'}) threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS normalizeSign({name: 'hmac', hash: { name: 'AES-CBC', iv: originalIv }}) threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS algorithm.name is 'HMAC'
PASS algorithm.hash.name is 'SHA-1'
PASS normalizeEncrypt(validHmacSha1) threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS successfullyParsed is true
TEST COMPLETE