@@ -497,7 +497,7 @@ The possible usages are:
497
497
Valid key usages depend on the key algorithm (identified by
498
498
` cryptokey.algorithm.name ` ).
499
499
500
- | Key Type | ` 'encrypt' ` | ` 'decrypt' ` | ` 'sign' ` | ` 'verify' ` | ` 'deriveKey' ` | ` 'deriveBits' ` | ` 'wrapKey' ` | ` 'unwrapKey' ` |
500
+ | Supported Key Algorithm | ` 'encrypt' ` | ` 'decrypt' ` | ` 'sign' ` | ` 'verify' ` | ` 'deriveKey' ` | ` 'deriveBits' ` | ` 'wrapKey' ` | ` 'unwrapKey' ` |
501
501
| ------------------------------------------------------- | ----------- | ----------- | -------- | ---------- | ------------- | -------------- | ----------- | ------------- |
502
502
| ` 'AES-CBC' ` | ✔ | ✔ | | | | | ✔ | ✔ |
503
503
| ` 'AES-CTR' ` | ✔ | ✔ | | | | | ✔ | ✔ |
@@ -556,7 +556,7 @@ added: v15.0.0
556
556
* ` algorithm ` : {RsaOaepParams|AesCtrParams|AesCbcParams|AesGcmParams}
557
557
* ` key ` : {CryptoKey}
558
558
* ` data ` : {ArrayBuffer|TypedArray|DataView|Buffer}
559
- * Returns: {Promise} Fulfills with an {ArrayBuffer}
559
+ * Returns: {Promise} Fulfills with an {ArrayBuffer} upon success.
560
560
561
561
Using the method and parameters specified in ` algorithm ` and the keying
562
562
material provided by ` key ` , ` subtle.decrypt() ` attempts to decipher the
@@ -590,10 +590,10 @@ changes:
590
590
591
591
<!-- lint disable maximum-line-length remark-lint-->
592
592
593
- * ` algorithm ` : {AlgorithmIdentifier| EcdhKeyDeriveParams|HkdfParams|Pbkdf2Params}
593
+ * ` algorithm ` : {EcdhKeyDeriveParams|HkdfParams|Pbkdf2Params}
594
594
* ` baseKey ` : {CryptoKey}
595
595
* ` length ` : {number|null} ** Default:** ` null `
596
- * Returns: {Promise} Fulfills with an {ArrayBuffer}
596
+ * Returns: {Promise} Fulfills with an {ArrayBuffer} upon success.
597
597
598
598
<!-- lint enable maximum-line-length remark-lint-->
599
599
@@ -630,12 +630,12 @@ changes:
630
630
631
631
<!-- lint disable maximum-line-length remark-lint-->
632
632
633
- * ` algorithm ` : {AlgorithmIdentifier| EcdhKeyDeriveParams|HkdfParams|Pbkdf2Params}
633
+ * ` algorithm ` : {EcdhKeyDeriveParams|HkdfParams|Pbkdf2Params}
634
634
* ` baseKey ` : {CryptoKey}
635
- * ` derivedKeyAlgorithm ` : {HmacKeyGenParams|AesKeyGenParams }
635
+ * ` derivedKeyAlgorithm ` : {string|AlgorithmIdentifier|HmacImportParams|AesDerivedKeyParams }
636
636
* ` extractable ` : {boolean}
637
637
* ` keyUsages ` : {string\[ ] } See [ Key usages] [ ] .
638
- * Returns: {Promise} Fulfills with a {CryptoKey}
638
+ * Returns: {Promise} Fulfills with a {CryptoKey} upon success.
639
639
640
640
<!-- lint enable maximum-line-length remark-lint-->
641
641
@@ -662,9 +662,9 @@ The algorithms currently supported include:
662
662
added: v15.0.0
663
663
-->
664
664
665
- * ` algorithm ` : {string|Object }
665
+ * ` algorithm ` : {string|AlgorithmIdentifier }
666
666
* ` data ` : {ArrayBuffer|TypedArray|DataView|Buffer}
667
- * Returns: {Promise} Fulfills with an {ArrayBuffer}
667
+ * Returns: {Promise} Fulfills with an {ArrayBuffer} upon success.
668
668
669
669
Using the method identified by ` algorithm ` , ` subtle.digest() ` attempts to
670
670
generate a digest of ` data ` . If successful, the returned promise is resolved
@@ -689,7 +689,7 @@ added: v15.0.0
689
689
* ` algorithm ` : {RsaOaepParams|AesCtrParams|AesCbcParams|AesGcmParams}
690
690
* ` key ` : {CryptoKey}
691
691
* ` data ` : {ArrayBuffer|TypedArray|DataView|Buffer}
692
- * Returns: {Promise} Fulfills with an {ArrayBuffer}
692
+ * Returns: {Promise} Fulfills with an {ArrayBuffer} upon success.
693
693
694
694
Using the method and parameters specified by ` algorithm ` and the keying
695
695
material provided by ` key ` , ` subtle.encrypt() ` attempts to encipher ` data ` .
@@ -721,7 +721,7 @@ changes:
721
721
722
722
* ` format ` : {string} Must be one of ` 'raw' ` , ` 'pkcs8' ` , ` 'spki' ` , or ` 'jwk' ` .
723
723
* ` key ` : {CryptoKey}
724
- * Returns: {Promise} Fulfills with an {ArrayBuffer|Object}.
724
+ * Returns: {Promise} Fulfills with an {ArrayBuffer|Object} upon success .
725
725
726
726
Exports the given key into the specified format, if supported.
727
727
@@ -735,7 +735,7 @@ When `format` is `'jwk'` and the export is successful, the returned promise
735
735
will be resolved with a JavaScript object conforming to the [ JSON Web Key] [ ]
736
736
specification.
737
737
738
- | Key Type | ` 'spki' ` | ` 'pkcs8' ` | ` 'jwk' ` | ` 'raw' ` |
738
+ | Supported Key Algorithm | ` 'spki' ` | ` 'pkcs8' ` | ` 'jwk' ` | ` 'raw' ` |
739
739
| ------------------------------------------------------- | -------- | --------- | ------- | ------- |
740
740
| ` 'AES-CBC' ` | | | ✔ | ✔ |
741
741
| ` 'AES-CTR' ` | | | ✔ | ✔ |
@@ -745,9 +745,7 @@ specification.
745
745
| ` 'ECDSA' ` | ✔ | ✔ | ✔ | ✔ |
746
746
| ` 'Ed25519' ` | ✔ | ✔ | ✔ | ✔ |
747
747
| ` 'Ed448' ` <span class =" experimental-inline " ></span >[ ^ 1 ] | ✔ | ✔ | ✔ | ✔ |
748
- | ` 'HDKF' ` | | | | |
749
748
| ` 'HMAC' ` | | | ✔ | ✔ |
750
- | ` 'PBKDF2' ` | | | | |
751
749
| ` 'RSA-OAEP' ` | ✔ | ✔ | ✔ | |
752
750
| ` 'RSA-PSS' ` | ✔ | ✔ | ✔ | |
753
751
| ` 'RSASSA-PKCS1-v1_5' ` | ✔ | ✔ | ✔ | |
@@ -760,13 +758,13 @@ added: v15.0.0
760
758
761
759
<!-- lint disable maximum-line-length remark-lint-->
762
760
763
- * ` algorithm ` : {AlgorithmIdentifier|RsaHashedKeyGenParams|EcKeyGenParams|HmacKeyGenParams|AesKeyGenParams}
761
+ * ` algorithm ` : {string| AlgorithmIdentifier|RsaHashedKeyGenParams|EcKeyGenParams|HmacKeyGenParams|AesKeyGenParams}
764
762
765
763
<!-- lint enable maximum-line-length remark-lint-->
766
764
767
765
* ` extractable ` : {boolean}
768
766
* ` keyUsages ` : {string\[ ] } See [ Key usages] [ ] .
769
- * Returns: {Promise} Fulfills with a {CryptoKey|CryptoKeyPair}
767
+ * Returns: {Promise} Fulfills with a {CryptoKey|CryptoKeyPair} upon success.
770
768
771
769
Using the method and parameters provided in ` algorithm ` , ` subtle.generateKey() `
772
770
attempts to generate new keying material. Depending the method used, the method
@@ -814,13 +812,13 @@ changes:
814
812
815
813
<!-- lint disable maximum-line-length remark-lint-->
816
814
817
- * ` algorithm ` : {AlgorithmIdentifier|RsaHashedImportParams|EcKeyImportParams|HmacImportParams}
815
+ * ` algorithm ` : {string| AlgorithmIdentifier|RsaHashedImportParams|EcKeyImportParams|HmacImportParams}
818
816
819
817
<!-- lint enable maximum-line-length remark-lint-->
820
818
821
819
* ` extractable ` : {boolean}
822
820
* ` keyUsages ` : {string\[ ] } See [ Key usages] [ ] .
823
- * Returns: {Promise} Fulfills with a {CryptoKey}
821
+ * Returns: {Promise} Fulfills with a {CryptoKey} upon success.
824
822
825
823
The ` subtle.importKey() ` method attempts to interpret the provided ` keyData `
826
824
as the given ` format ` to create a {CryptoKey} instance using the provided
@@ -831,7 +829,7 @@ If importing a `'PBKDF2'` key, `extractable` must be `false`.
831
829
832
830
The algorithms currently supported include:
833
831
834
- | Key Type | ` 'spki' ` | ` 'pkcs8' ` | ` 'jwk' ` | ` 'raw' ` |
832
+ | Supported Key Algorithm | ` 'spki' ` | ` 'pkcs8' ` | ` 'jwk' ` | ` 'raw' ` |
835
833
| ------------------------------------------------------- | -------- | --------- | ------- | ------- |
836
834
| ` 'AES-CBC' ` | | | ✔ | ✔ |
837
835
| ` 'AES-CTR' ` | | | ✔ | ✔ |
@@ -864,10 +862,10 @@ changes:
864
862
865
863
<!-- lint disable maximum-line-length remark-lint-->
866
864
867
- * ` algorithm ` : {AlgorithmIdentifier|RsaPssParams|EcdsaParams|Ed448Params}
865
+ * ` algorithm ` : {string| AlgorithmIdentifier|RsaPssParams|EcdsaParams|Ed448Params}
868
866
* ` key ` : {CryptoKey}
869
867
* ` data ` : {ArrayBuffer|TypedArray|DataView|Buffer}
870
- * Returns: {Promise} Fulfills with an {ArrayBuffer}
868
+ * Returns: {Promise} Fulfills with an {ArrayBuffer} upon success.
871
869
872
870
<!-- lint enable maximum-line-length remark-lint-->
873
871
@@ -897,14 +895,14 @@ added: v15.0.0
897
895
898
896
<!-- lint disable maximum-line-length remark-lint-->
899
897
900
- * ` unwrapAlgo ` : {AlgorithmIdentifier|RsaOaepParams|AesCtrParams|AesCbcParams|AesGcmParams}
901
- * ` unwrappedKeyAlgo ` : {AlgorithmIdentifier|RsaHashedImportParams|EcKeyImportParams|HmacImportParams}
898
+ * ` unwrapAlgo ` : {string| AlgorithmIdentifier|RsaOaepParams|AesCtrParams|AesCbcParams|AesGcmParams}
899
+ * ` unwrappedKeyAlgo ` : {string| AlgorithmIdentifier|RsaHashedImportParams|EcKeyImportParams|HmacImportParams}
902
900
903
901
<!-- lint enable maximum-line-length remark-lint-->
904
902
905
903
* ` extractable ` : {boolean}
906
904
* ` keyUsages ` : {string\[ ] } See [ Key usages] [ ] .
907
- * Returns: {Promise} Fulfills with a {CryptoKey}
905
+ * Returns: {Promise} Fulfills with a {CryptoKey} upon success.
908
906
909
907
In cryptography, "wrapping a key" refers to exporting and then encrypting the
910
908
keying material. The ` subtle.unwrapKey() ` method attempts to decrypt a wrapped
@@ -954,11 +952,11 @@ changes:
954
952
955
953
<!-- lint disable maximum-line-length remark-lint-->
956
954
957
- * ` algorithm ` : {AlgorithmIdentifier|RsaPssParams|EcdsaParams|Ed448Params}
955
+ * ` algorithm ` : {string| AlgorithmIdentifier|RsaPssParams|EcdsaParams|Ed448Params}
958
956
* ` key ` : {CryptoKey}
959
957
* ` signature ` : {ArrayBuffer|TypedArray|DataView|Buffer}
960
958
* ` data ` : {ArrayBuffer|TypedArray|DataView|Buffer}
961
- * Returns: {Promise} Fulfills with a {boolean}
959
+ * Returns: {Promise} Fulfills with a {boolean} upon success.
962
960
963
961
<!-- lint enable maximum-line-length remark-lint-->
964
962
@@ -987,8 +985,8 @@ added: v15.0.0
987
985
* ` format ` : {string} Must be one of ` 'raw' ` , ` 'pkcs8' ` , ` 'spki' ` , or ` 'jwk' ` .
988
986
* ` key ` : {CryptoKey}
989
987
* ` wrappingKey ` : {CryptoKey}
990
- * ` wrapAlgo ` : {AlgorithmIdentifier|RsaOaepParams|AesCtrParams|AesCbcParams|AesGcmParams}
991
- * Returns: {Promise} Fulfills with an {ArrayBuffer}
988
+ * ` wrapAlgo ` : {string| AlgorithmIdentifier|RsaOaepParams|AesCtrParams|AesCbcParams|AesGcmParams}
989
+ * Returns: {Promise} Fulfills with an {ArrayBuffer} upon success.
992
990
993
991
<!-- lint enable maximum-line-length remark-lint-->
994
992
@@ -1019,21 +1017,43 @@ are simple JavaScript dictionary objects.
1019
1017
### Class: ` AlgorithmIdentifier `
1020
1018
1021
1019
<!-- YAML
1022
- added:
1023
- - v18.4.0
1024
- - v16.17.0
1020
+ added: v15.0.0
1025
1021
-->
1026
1022
1027
1023
#### ` algorithmIdentifier.name `
1028
1024
1029
1025
<!-- YAML
1030
- added:
1031
- - v18.4.0
1032
- - v16.17.0
1026
+ added: v15.0.0
1033
1027
-->
1034
1028
1035
1029
* Type: {string}
1036
1030
1031
+ ### Class: ` AesDerivedKeyParams `
1032
+
1033
+ <!-- YAML
1034
+ added: v15.0.0
1035
+ -->
1036
+
1037
+ #### ` aesDerivedKeyParams.name `
1038
+
1039
+ <!-- YAML
1040
+ added: v15.0.0
1041
+ -->
1042
+
1043
+ * Type: {string} Must be one of ` 'AES-CBC' ` , ` 'AES-CTR' ` , ` 'AES-GCM' ` , or
1044
+ ` 'AES-KW' `
1045
+
1046
+ #### ` aesDerivedKeyParams.length `
1047
+
1048
+ <!-- YAML
1049
+ added: v15.0.0
1050
+ -->
1051
+
1052
+ * Type: {number}
1053
+
1054
+ The length of the AES key to be derived. This must be either ` 128 ` , ` 192 ` ,
1055
+ or ` 256 ` .
1056
+
1037
1057
### Class: ` AesCbcParams `
1038
1058
1039
1059
<!-- YAML
0 commit comments