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