@@ -1231,52 +1231,77 @@ <h2>SubtleCrypto interface</h2>
1231
1231
1232
1232
[SecureContext,Exposed=(Window,Worker)]
1233
1233
interface SubtleCrypto {
1234
- Promise<any> encrypt(AlgorithmIdentifier algorithm,
1235
- CryptoKey key,
1236
- BufferSource data);
1237
- Promise<any> decrypt(AlgorithmIdentifier algorithm,
1238
- CryptoKey key,
1239
- BufferSource data);
1240
- Promise<any> sign(AlgorithmIdentifier algorithm,
1241
- CryptoKey key,
1242
- BufferSource data);
1243
- Promise<any> verify(AlgorithmIdentifier algorithm,
1244
- CryptoKey key,
1245
- BufferSource signature,
1246
- BufferSource data);
1247
- Promise<any> digest(AlgorithmIdentifier algorithm,
1248
- BufferSource data);
1249
-
1250
- Promise<any> generateKey(AlgorithmIdentifier algorithm,
1251
- boolean extractable,
1252
- sequence<KeyUsage> keyUsages );
1253
- Promise<any> deriveKey(AlgorithmIdentifier algorithm,
1254
- CryptoKey baseKey,
1255
- AlgorithmIdentifier derivedKeyType,
1256
- boolean extractable,
1257
- sequence<KeyUsage> keyUsages );
1258
- Promise<ArrayBuffer> deriveBits(AlgorithmIdentifier algorithm,
1259
- CryptoKey baseKey,
1260
- optional unsigned long? length = null);
1261
-
1262
- Promise<CryptoKey> importKey(KeyFormat format,
1263
- (BufferSource or JsonWebKey) keyData,
1264
- AlgorithmIdentifier algorithm,
1265
- boolean extractable,
1266
- sequence<KeyUsage> keyUsages );
1267
- Promise<any> exportKey(KeyFormat format, CryptoKey key);
1268
-
1269
- Promise<any> wrapKey(KeyFormat format,
1270
- CryptoKey key,
1271
- CryptoKey wrappingKey,
1272
- AlgorithmIdentifier wrapAlgorithm);
1273
- Promise<CryptoKey> unwrapKey(KeyFormat format,
1274
- BufferSource wrappedKey,
1275
- CryptoKey unwrappingKey,
1276
- AlgorithmIdentifier unwrapAlgorithm,
1277
- AlgorithmIdentifier unwrappedKeyAlgorithm,
1278
- boolean extractable,
1279
- sequence<KeyUsage> keyUsages );
1234
+ Promise<ArrayBuffer> encrypt(
1235
+ AlgorithmIdentifier algorithm,
1236
+ CryptoKey key,
1237
+ BufferSource data
1238
+ );
1239
+ Promise<ArrayBuffer> decrypt(
1240
+ AlgorithmIdentifier algorithm,
1241
+ CryptoKey key,
1242
+ BufferSource data
1243
+ );
1244
+ Promise<ArrayBuffer> sign(
1245
+ AlgorithmIdentifier algorithm,
1246
+ CryptoKey key,
1247
+ BufferSource data
1248
+ );
1249
+ Promise<boolean> verify(
1250
+ AlgorithmIdentifier algorithm,
1251
+ CryptoKey key,
1252
+ BufferSource signature,
1253
+ BufferSource data
1254
+ );
1255
+ Promise<ArrayBuffer> digest(
1256
+ AlgorithmIdentifier algorithm,
1257
+ BufferSource data
1258
+ );
1259
+
1260
+ Promise<(CryptoKey or CryptoKeyPair)> generateKey(
1261
+ AlgorithmIdentifier algorithm,
1262
+ boolean extractable,
1263
+ sequence<KeyUsage> keyUsages
1264
+ );
1265
+ Promise<CryptoKey> deriveKey(
1266
+ AlgorithmIdentifier algorithm,
1267
+ CryptoKey baseKey,
1268
+ AlgorithmIdentifier derivedKeyType,
1269
+ boolean extractable,
1270
+ sequence<KeyUsage> keyUsages
1271
+ );
1272
+ Promise<ArrayBuffer> deriveBits(
1273
+ AlgorithmIdentifier algorithm,
1274
+ CryptoKey baseKey,
1275
+ optional unsigned long? length = null
1276
+ );
1277
+
1278
+ Promise<CryptoKey> importKey(
1279
+ KeyFormat format,
1280
+ (BufferSource or JsonWebKey) keyData,
1281
+ AlgorithmIdentifier algorithm,
1282
+ boolean extractable,
1283
+ sequence<KeyUsage> keyUsages
1284
+ );
1285
+ Promise<(ArrayBuffer or JsonWebKey)> exportKey(
1286
+ KeyFormat format,
1287
+ CryptoKey key
1288
+ );
1289
+
1290
+ Promise<ArrayBuffer> wrapKey(
1291
+ KeyFormat format,
1292
+ CryptoKey key,
1293
+ CryptoKey wrappingKey,
1294
+ AlgorithmIdentifier wrapAlgorithm
1295
+ );
1296
+ Promise<CryptoKey> unwrapKey(
1297
+ KeyFormat format,
1298
+ BufferSource wrappedKey,
1299
+ CryptoKey unwrappingKey,
1300
+ AlgorithmIdentifier unwrapAlgorithm,
1301
+ AlgorithmIdentifier unwrappedKeyAlgorithm,
1302
+ boolean extractable,
1303
+ sequence<KeyUsage> keyUsages
1304
+ );
1280
1305
};
1281
1306
</pre>
1282
1307
<div class=note>
0 commit comments