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