@@ -42,52 +42,77 @@ enum KeyFormat { "raw", "spki", "pkcs8", "jwk" };
42
42
43
43
[SecureContext,Exposed=(Window,Worker)]
44
44
interface SubtleCrypto {
45
- Promise<any> encrypt(AlgorithmIdentifier algorithm,
46
- CryptoKey key,
47
- BufferSource data);
48
- Promise<any> decrypt(AlgorithmIdentifier algorithm,
49
- CryptoKey key,
50
- BufferSource data);
51
- Promise<any> sign(AlgorithmIdentifier algorithm,
52
- CryptoKey key,
53
- BufferSource data);
54
- Promise<any> verify(AlgorithmIdentifier algorithm,
55
- CryptoKey key,
56
- BufferSource signature,
57
- BufferSource data);
58
- Promise<any> digest(AlgorithmIdentifier algorithm,
59
- BufferSource data);
60
-
61
- Promise<any> generateKey(AlgorithmIdentifier algorithm,
62
- boolean extractable,
63
- sequence<KeyUsage> keyUsages );
64
- Promise<any> deriveKey(AlgorithmIdentifier algorithm,
65
- CryptoKey baseKey,
66
- AlgorithmIdentifier derivedKeyType,
67
- boolean extractable,
68
- sequence<KeyUsage> keyUsages );
69
- Promise<ArrayBuffer> deriveBits(AlgorithmIdentifier algorithm,
70
- CryptoKey baseKey,
71
- optional unsigned long? length = null);
72
-
73
- Promise<CryptoKey> importKey(KeyFormat format,
74
- (BufferSource or JsonWebKey) keyData,
75
- AlgorithmIdentifier algorithm,
76
- boolean extractable,
77
- sequence<KeyUsage> keyUsages );
78
- Promise<any> exportKey(KeyFormat format, CryptoKey key);
79
-
80
- Promise<any> wrapKey(KeyFormat format,
81
- CryptoKey key,
82
- CryptoKey wrappingKey,
83
- AlgorithmIdentifier wrapAlgorithm);
84
- Promise<CryptoKey> unwrapKey(KeyFormat format,
85
- BufferSource wrappedKey,
86
- CryptoKey unwrappingKey,
87
- AlgorithmIdentifier unwrapAlgorithm,
88
- AlgorithmIdentifier unwrappedKeyAlgorithm,
89
- boolean extractable,
90
- sequence<KeyUsage> keyUsages );
45
+ Promise<ArrayBuffer> encrypt(
46
+ AlgorithmIdentifier algorithm,
47
+ CryptoKey key,
48
+ BufferSource data
49
+ );
50
+ Promise<ArrayBuffer> decrypt(
51
+ AlgorithmIdentifier algorithm,
52
+ CryptoKey key,
53
+ BufferSource data
54
+ );
55
+ Promise<ArrayBuffer> sign(
56
+ AlgorithmIdentifier algorithm,
57
+ CryptoKey key,
58
+ BufferSource data
59
+ );
60
+ Promise<boolean> verify(
61
+ AlgorithmIdentifier algorithm,
62
+ CryptoKey key,
63
+ BufferSource signature,
64
+ BufferSource data
65
+ );
66
+ Promise<ArrayBuffer> digest(
67
+ AlgorithmIdentifier algorithm,
68
+ BufferSource data
69
+ );
70
+
71
+ Promise<(CryptoKey or CryptoKeyPair)> generateKey(
72
+ AlgorithmIdentifier algorithm,
73
+ boolean extractable,
74
+ sequence<KeyUsage> keyUsages
75
+ );
76
+ Promise<CryptoKey> deriveKey(
77
+ AlgorithmIdentifier algorithm,
78
+ CryptoKey baseKey,
79
+ AlgorithmIdentifier derivedKeyType,
80
+ boolean extractable,
81
+ sequence<KeyUsage> keyUsages
82
+ );
83
+ Promise<ArrayBuffer> deriveBits(
84
+ AlgorithmIdentifier algorithm,
85
+ CryptoKey baseKey,
86
+ optional unsigned long? length = null
87
+ );
88
+
89
+ Promise<CryptoKey> importKey(
90
+ KeyFormat format,
91
+ (BufferSource or JsonWebKey) keyData,
92
+ AlgorithmIdentifier algorithm,
93
+ boolean extractable,
94
+ sequence<KeyUsage> keyUsages
95
+ );
96
+ Promise<(ArrayBuffer or JsonWebKey)> exportKey(
97
+ KeyFormat format,
98
+ CryptoKey key
99
+ );
100
+
101
+ Promise<ArrayBuffer> wrapKey(
102
+ KeyFormat format,
103
+ CryptoKey key,
104
+ CryptoKey wrappingKey,
105
+ AlgorithmIdentifier wrapAlgorithm
106
+ );
107
+ Promise<CryptoKey> unwrapKey(
108
+ KeyFormat format,
109
+ BufferSource wrappedKey,
110
+ CryptoKey unwrappingKey,
111
+ AlgorithmIdentifier unwrapAlgorithm,
112
+ AlgorithmIdentifier unwrappedKeyAlgorithm,
113
+ boolean extractable,
114
+ sequence<KeyUsage> keyUsages
115
+ );
91
116
};
92
117
93
118
dictionary RsaOtherPrimesInfo {
0 commit comments