OLD | NEW |
1 Tests cypto.subtle.generateKey. | 1 Tests cypto.subtle.generateKey. |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 PASS crypto.subtle.generateKey(aesCbc, extractable, -1) threw exception TypeErro
r: Type error. | 6 PASS crypto.subtle.generateKey(aesCbc, extractable, -1) threw exception TypeErro
r: Type error. |
7 PASS crypto.subtle.generateKey(aesCbc, extractable, null) threw exception TypeEr
ror: Type error. | 7 PASS crypto.subtle.generateKey(aesCbc, extractable, null) threw exception TypeEr
ror: Type error. |
8 PASS crypto.subtle.generateKey(aesCbc, extractable, ['boo']) threw exception Typ
eError: Invalid keyUsages argument. | 8 PASS crypto.subtle.generateKey(aesCbc, extractable, ['boo']) threw exception Typ
eError: Invalid keyUsages argument. |
9 PASS crypto.subtle.generateKey({ name: 'aes-cbc' }, extractable, keyUsages) thre
w exception TypeError: Algorithm: AES-CBC: AesKeyGenParams: length: Missing requ
ired property. | 9 PASS crypto.subtle.generateKey({ name: 'aes-cbc' }, extractable, keyUsages) thre
w exception TypeError: Algorithm: AES-CBC: AesKeyGenParams: length: Missing requ
ired property. |
10 PASS crypto.subtle.generateKey({ name: 'aes-cbc', length: 70000 }, extractable,
keyUsages) threw exception TypeError: Algorithm: AES-CBC: AesKeyGenParams: lengt
h: Outside of numeric range. | 10 PASS crypto.subtle.generateKey({ name: 'aes-cbc', length: 70000 }, extractable,
keyUsages) threw exception TypeError: Algorithm: AES-CBC: AesKeyGenParams: lengt
h: Outside of numeric range. |
11 PASS crypto.subtle.generateKey({ name: 'aes-cbc', length: -3 }, extractable, key
Usages) threw exception TypeError: Algorithm: AES-CBC: AesKeyGenParams: length:
Outside of numeric range. | 11 PASS crypto.subtle.generateKey({ name: 'aes-cbc', length: -3 }, extractable, key
Usages) threw exception TypeError: Algorithm: AES-CBC: AesKeyGenParams: length:
Outside of numeric range. |
12 PASS crypto.subtle.generateKey({ name: 'aes-cbc', length: -Infinity }, extractab
le, keyUsages) threw exception TypeError: Algorithm: AES-CBC: AesKeyGenParams: l
ength: Outside of numeric range. | 12 PASS crypto.subtle.generateKey({ name: 'aes-cbc', length: -Infinity }, extractab
le, keyUsages) threw exception TypeError: Algorithm: AES-CBC: AesKeyGenParams: l
ength: Outside of numeric range. |
13 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: -
3}, extractable , keyUsages) threw exception TypeError: Algorithm: HMAC: HmacKey
Params: length: Outside of numeric range. | 13 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: -
3}, extractable , keyUsages) threw exception TypeError: Algorithm: HMAC: HmacKey
Params: length: Outside of numeric range. |
14 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: ''}, length: 48}, ext
ractable , keyUsages) threw exception NotSupportedError: Algorithm: HMAC: HmacKe
yParams: hash: Algorithm: Unrecognized algorithm name. | 14 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: ''}, length: 48}, ext
ractable , keyUsages) threw exception NotSupportedError: Algorithm: HMAC: HmacKe
yParams: hash: Algorithm: Unrecognized algorithm name. |
15 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: 5
000000000}, extractable , keyUsages) threw exception TypeError: Algorithm: HMAC:
HmacKeyParams: length: Outside of numeric range. | 15 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: 5
000000000}, extractable , keyUsages) threw exception TypeError: Algorithm: HMAC:
HmacKeyParams: length: Outside of numeric range. |
16 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: N
aN}, extractable , keyUsages) threw exception TypeError: Algorithm: HMAC: HmacKe
yParams: length: Is not a number. | 16 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: N
aN}, extractable , keyUsages) threw exception TypeError: Algorithm: HMAC: HmacKe
yParams: length: Is not a number. |
17 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: I
nfinity}, extractable , keyUsages) threw exception TypeError: Algorithm: HMAC: H
macKeyParams: length: Outside of numeric range. | 17 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: I
nfinity}, extractable , keyUsages) threw exception TypeError: Algorithm: HMAC: H
macKeyParams: length: Outside of numeric range. |
18 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: -
Infinity}, extractable , keyUsages) threw exception TypeError: Algorithm: HMAC:
HmacKeyParams: length: Outside of numeric range. | 18 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: -
Infinity}, extractable , keyUsages) threw exception TypeError: Algorithm: HMAC:
HmacKeyParams: length: Outside of numeric range. |
19 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: c
rypto}, extractable , keyUsages) threw exception TypeError: Algorithm: HMAC: Hma
cKeyParams: length: Is not a number. | 19 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: c
rypto}, extractable , keyUsages) threw exception TypeError: Algorithm: HMAC: Hma
cKeyParams: length: Is not a number. |
20 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: u
ndefined}, extractable , keyUsages) threw exception TypeError: Algorithm: HMAC:
HmacKeyParams: length: Is not a number. | 20 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: u
ndefined}, extractable , keyUsages) threw exception TypeError: Algorithm: HMAC:
HmacKeyParams: length: Is not a number. |
21 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: '
48'}, extractable , keyUsages) did not throw exception. | 21 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: '
48'}, extractable , keyUsages) did not throw exception. |
22 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: n
ull}, extractable , keyUsages) did not throw exception. | 22 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: n
ull}, extractable , keyUsages) did not throw exception. |
23 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: t
rue}, extractable , keyUsages) did not throw exception. | 23 PASS crypto.subtle.generateKey({name: 'hmac', hash: {name: 'sha-256'}, length: t
rue}, extractable , keyUsages) did not throw exception. |
24 PASS crypto.subtle.generateKey({name: 'RSASSA-PKCS1-v1_5', modulusLength: -30},
extractable , keyUsages) threw exception TypeError: Algorithm: RSASSA-PKCS1-v1_5
: RsaKeyGenParams: modulusLength: Outside of numeric range. | 24 PASS crypto.subtle.generateKey({name: 'RSASSA-PKCS1-v1_5', modulusLength: -30},
extractable , keyUsages) threw exception TypeError: Algorithm: RSASSA-PKCS1-v1_5
: RsaKeyGenParams: modulusLength: Outside of numeric range. |
25 PASS crypto.subtle.generateKey({name: 'RSASSA-PKCS1-v1_5', modulusLength: NaN},
extractable , keyUsages) threw exception TypeError: Algorithm: RSASSA-PKCS1-v1_5
: RsaKeyGenParams: modulusLength: Is not a number. | 25 PASS crypto.subtle.generateKey({name: 'RSASSA-PKCS1-v1_5', modulusLength: NaN},
extractable , keyUsages) threw exception TypeError: Algorithm: RSASSA-PKCS1-v1_5
: RsaKeyGenParams: modulusLength: Is not a number. |
26 PASS crypto.subtle.generateKey({name: 'RSASSA-PKCS1-v1_5'}, extractable , keyUsa
ges) threw exception TypeError: Algorithm: RSASSA-PKCS1-v1_5: RsaKeyGenParams: m
odulusLength: Missing required property. | 26 PASS crypto.subtle.generateKey({name: 'RSASSA-PKCS1-v1_5'}, extractable , keyUsa
ges) threw exception TypeError: Algorithm: RSASSA-PKCS1-v1_5: RsaKeyGenParams: m
odulusLength: Missing required property. |
27 PASS crypto.subtle.generateKey({name: 'RSASSA-PKCS1-v1_5', modulusLength: 10}, e
xtractable , keyUsages) threw exception TypeError: Algorithm: RSASSA-PKCS1-v1_5:
RsaKeyGenParams: publicExponent: Missing or not a Uint8Array. | 27 PASS crypto.subtle.generateKey({name: 'RSASSA-PKCS1-v1_5', modulusLength: 10}, e
xtractable , keyUsages) threw exception TypeError: Algorithm: RSASSA-PKCS1-v1_5:
RsaKeyGenParams: publicExponent: Missing or not a Uint8Array. |
28 PASS crypto.subtle.generateKey({name: 'RSASSA-PKCS1-v1_5', modulusLength: 10, pu
blicExponent: 10}, extractable , keyUsages) threw exception TypeError: Algorithm
: RSASSA-PKCS1-v1_5: RsaKeyGenParams: publicExponent: Missing or not a Uint8Arra
y. | 28 PASS crypto.subtle.generateKey({name: 'RSASSA-PKCS1-v1_5', modulusLength: 10, pu
blicExponent: 10}, extractable , keyUsages) threw exception TypeError: Algorithm
: RSASSA-PKCS1-v1_5: RsaKeyGenParams: publicExponent: Missing or not a Uint8Arra
y. |
29 PASS crypto.subtle.generateKey({name: 'RSASSA-PKCS1-v1_5', modulusLength: 10, pu
blicExponent: null}, extractable , keyUsages) threw exception TypeError: Algorit
hm: RSASSA-PKCS1-v1_5: RsaKeyGenParams: publicExponent: Missing or not a Uint8Ar
ray. | 29 PASS crypto.subtle.generateKey({name: 'RSASSA-PKCS1-v1_5', modulusLength: 10, pu
blicExponent: null}, extractable , keyUsages) threw exception TypeError: Algorit
hm: RSASSA-PKCS1-v1_5: RsaKeyGenParams: publicExponent: Missing or not a Uint8Ar
ray. |
| 30 PASS crypto.subtle.generateKey({name: 'RSAES-PKCS1-v1_5', modulusLength: -30}, e
xtractable , keyUsages) threw exception TypeError: Algorithm: RSAES-PKCS1-v1_5:
RsaKeyGenParams: modulusLength: Outside of numeric range. |
| 31 PASS crypto.subtle.generateKey({name: 'RSAES-PKCS1-v1_5', modulusLength: NaN}, e
xtractable , keyUsages) threw exception TypeError: Algorithm: RSAES-PKCS1-v1_5:
RsaKeyGenParams: modulusLength: Is not a number. |
| 32 PASS crypto.subtle.generateKey({name: 'RSAES-PKCS1-v1_5'}, extractable , keyUsag
es) threw exception TypeError: Algorithm: RSAES-PKCS1-v1_5: RsaKeyGenParams: mod
ulusLength: Missing required property. |
| 33 PASS crypto.subtle.generateKey({name: 'RSAES-PKCS1-v1_5', modulusLength: 10}, ex
tractable , keyUsages) threw exception TypeError: Algorithm: RSAES-PKCS1-v1_5: R
saKeyGenParams: publicExponent: Missing or not a Uint8Array. |
| 34 PASS crypto.subtle.generateKey({name: 'RSAES-PKCS1-v1_5', modulusLength: 10, pub
licExponent: 10}, extractable , keyUsages) threw exception TypeError: Algorithm:
RSAES-PKCS1-v1_5: RsaKeyGenParams: publicExponent: Missing or not a Uint8Array. |
| 35 PASS crypto.subtle.generateKey({name: 'RSAES-PKCS1-v1_5', modulusLength: 10, pub
licExponent: null}, extractable , keyUsages) threw exception TypeError: Algorith
m: RSAES-PKCS1-v1_5: RsaKeyGenParams: publicExponent: Missing or not a Uint8Arra
y. |
30 PASS key.type is 'private' | 36 PASS key.type is 'private' |
31 PASS key.extractable is true | 37 PASS key.extractable is true |
32 PASS key.algorithm.name is 'AES-CBC' | 38 PASS key.algorithm.name is 'AES-CBC' |
33 PASS key.algorithm.length is 1024 | 39 PASS key.algorithm.length is 1024 |
34 PASS key.usages.join(',') is 'encrypt,decrypt' | 40 PASS key.usages.join(',') is 'encrypt,decrypt' |
35 PASS key.type is 'private' | 41 PASS key.type is 'private' |
36 PASS key.extractable is false | 42 PASS key.extractable is false |
37 PASS key.algorithm.name is 'HMAC' | 43 PASS key.algorithm.name is 'HMAC' |
38 PASS key.algorithm.hash.name is 'SHA-256' | 44 PASS key.algorithm.hash.name is 'SHA-256' |
39 PASS key.algorithm.length is null | 45 PASS key.algorithm.length is null |
40 PASS key.usages.join(',') is 'sign' | 46 PASS key.usages.join(',') is 'sign' |
41 PASS key.type is 'private' | 47 PASS key.type is 'private' |
42 PASS key.extractable is false | 48 PASS key.extractable is false |
43 PASS key.algorithm.name is 'HMAC' | 49 PASS key.algorithm.name is 'HMAC' |
44 PASS key.algorithm.hash.name is 'SHA-256' | 50 PASS key.algorithm.hash.name is 'SHA-256' |
45 PASS key.algorithm.length is 48 | 51 PASS key.algorithm.length is 48 |
46 PASS key.usages.join(',') is 'sign' | 52 PASS key.usages.join(',') is 'sign' |
47 PASS keyPair.publicKey is defined. | 53 PASS keyPair.publicKey is defined. |
48 PASS keyPair.privateKey is defined. | 54 PASS keyPair.privateKey is defined. |
49 PASS keyPair.publicKey.type is 'public' | 55 PASS keyPair.publicKey.type is 'public' |
50 PASS keyPair.publicKey.algorithm.name is 'RSASSA-PKCS1-v1_5' | 56 PASS keyPair.publicKey.algorithm.name is 'RSASSA-PKCS1-v1_5' |
51 PASS keyPair.privateKey.type is 'private' | 57 PASS keyPair.privateKey.type is 'private' |
52 PASS keyPair.privateKey.algorithm.name is 'RSASSA-PKCS1-v1_5' | 58 PASS keyPair.privateKey.algorithm.name is 'RSASSA-PKCS1-v1_5' |
53 PASS keyPair.publicKey.foo is 'bar' | 59 PASS keyPair.publicKey.foo is 'bar' |
54 PASS keyPair.publicKey.foo is 'bar' | 60 PASS keyPair.publicKey.foo is 'bar' |
55 PASS successfullyParsed is true | 61 PASS successfullyParsed is true |
56 | 62 |
57 TEST COMPLETE | 63 TEST COMPLETE |
58 | 64 |
OLD | NEW |