@@ -18,46 +18,31 @@ declare global {
1818 * const hash = await crypto.subtle.digest('SHA-256', new TextEncoder().encode('hello'));
1919 * ```
2020 */
21- digest (
22- algorithm : string | { name : string } ,
23- data : BufferSource
24- ) : Promise < ArrayBuffer > ;
21+ digest ( algorithm : string | { name : string } , data : BufferSource ) : Promise < ArrayBuffer > ;
2522
2623 /**
2724 * Encrypts data using a key.
2825 * @param algorithm The encryption algorithm and parameters.
2926 * @param key The encryption key.
3027 * @param data The data to encrypt.
3128 */
32- encrypt (
33- algorithm : unknown ,
34- key : CryptoKey ,
35- data : BufferSource
36- ) : Promise < ArrayBuffer > ;
29+ encrypt ( algorithm : unknown , key : CryptoKey , data : BufferSource ) : Promise < ArrayBuffer > ;
3730
3831 /**
3932 * Decrypts data using a key.
4033 * @param algorithm The encryption algorithm and parameters.
4134 * @param key The decryption key.
4235 * @param data The data to decrypt.
4336 */
44- decrypt (
45- algorithm : unknown ,
46- key : CryptoKey ,
47- data : BufferSource
48- ) : Promise < ArrayBuffer > ;
37+ decrypt ( algorithm : unknown , key : CryptoKey , data : BufferSource ) : Promise < ArrayBuffer > ;
4938
5039 /**
5140 * Signs data using a private key.
5241 * @param algorithm The signing algorithm and parameters.
5342 * @param key The private key.
5443 * @param data The data to sign.
5544 */
56- sign (
57- algorithm : unknown ,
58- key : CryptoKey ,
59- data : BufferSource
60- ) : Promise < ArrayBuffer > ;
45+ sign ( algorithm : unknown , key : CryptoKey , data : BufferSource ) : Promise < ArrayBuffer > ;
6146
6247 /**
6348 * Verifies a signature using a public key.
@@ -67,24 +52,15 @@ declare global {
6752 * @param data The original data.
6853 * @returns True if the signature is valid.
6954 */
70- verify (
71- algorithm : unknown ,
72- key : CryptoKey ,
73- signature : BufferSource ,
74- data : BufferSource
75- ) : Promise < boolean > ;
55+ verify ( algorithm : unknown , key : CryptoKey , signature : BufferSource , data : BufferSource ) : Promise < boolean > ;
7656
7757 /**
7858 * Generates a new cryptographic key or key pair.
7959 * @param algorithm The algorithm and parameters.
8060 * @param extractable Whether the key can be exported.
8161 * @param keyUsages The allowed operations for this key.
8262 */
83- generateKey (
84- algorithm : unknown ,
85- extractable : boolean ,
86- keyUsages : string [ ]
87- ) : Promise < CryptoKey | CryptoKeyPair > ;
63+ generateKey ( algorithm : unknown , extractable : boolean , keyUsages : string [ ] ) : Promise < CryptoKey | CryptoKeyPair > ;
8864
8965 /**
9066 * Imports a key from external format.
@@ -107,22 +83,15 @@ declare global {
10783 * @param format The key format ("raw", "pkcs8", "spki", "jwk").
10884 * @param key The key to export.
10985 */
110- exportKey (
111- format : string ,
112- key : CryptoKey
113- ) : Promise < ArrayBuffer | JsonWebKey > ;
86+ exportKey ( format : string , key : CryptoKey ) : Promise < ArrayBuffer | JsonWebKey > ;
11487
11588 /**
11689 * Derives bits from a base key.
11790 * @param algorithm The derivation algorithm and parameters.
11891 * @param baseKey The base key.
11992 * @param length The number of bits to derive.
12093 */
121- deriveBits (
122- algorithm : unknown ,
123- baseKey : CryptoKey ,
124- length : number
125- ) : Promise < ArrayBuffer > ;
94+ deriveBits ( algorithm : unknown , baseKey : CryptoKey , length : number ) : Promise < ArrayBuffer > ;
12695
12796 /**
12897 * Derives a new key from a base key.
0 commit comments