| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent aed9fd5 commit f488b2f
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,6 @@ const { | |||
| 5 | 5 | ArrayBufferPrototypeSlice, | |
| 6 | 6 | ArrayFrom, | |
| 7 | 7 | ArrayPrototypePush, | |
| 8 | - PromiseReject, | ||
| 9 | 8 | SafeSet, | |
| 10 | 9 | TypedArrayPrototypeSlice, | |
| 11 | 10 | } = primordials; | |
@@ -132,7 +131,7 @@ function asyncAesKwCipher(mode, key, data) { | |||
| 132 | 131 | getVariant('AES-KW', key.algorithm.length))); | |
| 133 | 132 | } | |
| 134 | 133 | ||
| 135 | - function asyncAesGcmCipher(mode, key, data, algorithm) { | ||
| 134 | + async function asyncAesGcmCipher(mode, key, data, algorithm) { | ||
| 136 | 135 | const { tagLength = 128 } = algorithm; | |
| 137 | 136 | ||
| 138 | 137 | const tagByteLength = tagLength / 8; | |
@@ -148,9 +147,9 @@ function asyncAesGcmCipher(mode, key, data, algorithm) { | |||
| 148 | 147 | // > If *plaintext* has a length less than *tagLength* bits, then `throw` | |
| 149 | 148 | // > an `OperationError`. | |
| 150 | 149 | if (tagByteLength > tag.byteLength) { | |
| 151 | - return PromiseReject(lazyDOMException( | ||
| 150 | + throw lazyDOMException( | ||
| 152 | 151 | 'The provided data is too small.', | |
| 153 | - 'OperationError')); | ||
| 152 | + 'OperationError'); | ||
| 154 | 153 | } | |
| 155 | 154 | ||
| 156 | 155 | data = slice(data, 0, -tagByteLength); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -342,7 +342,7 @@ function cfrgImportKey( | |||
| 342 | 342 | extractable); | |
| 343 | 343 | } | |
| 344 | 344 | ||
| 345 | - function eddsaSignVerify(key, data, algorithm, signature) { | ||
| 345 | + async function eddsaSignVerify(key, data, algorithm, signature) { | ||
| 346 | 346 | const mode = signature === undefined ? kSignJobModeSign : kSignJobModeVerify; | |
| 347 | 347 | const type = mode === kSignJobModeSign ? 'private' : 'public'; | |
| 348 | 348 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -283,7 +283,7 @@ function ecImportKey( | |||
| 283 | 283 | extractable); | |
| 284 | 284 | } | |
| 285 | 285 | ||
| 286 | - function ecdsaSignVerify(key, data, { name, hash }, signature) { | ||
| 286 | + async function ecdsaSignVerify(key, data, { name, hash }, signature) { | ||
| 287 | 287 | const mode = signature === undefined ? kSignJobModeSign : kSignJobModeVerify; | |
| 288 | 288 | const type = mode === kSignJobModeSign ? 'private' : 'public'; | |
| 289 | 289 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -91,7 +91,7 @@ function validateRsaOaepAlgorithm(algorithm) { | |||
| 91 | 91 | } | |
| 92 | 92 | } | |
| 93 | 93 | ||
| 94 | - function rsaOaepCipher(mode, key, data, algorithm) { | ||
| 94 | + async function rsaOaepCipher(mode, key, data, algorithm) { | ||
| 95 | 95 | validateRsaOaepAlgorithm(algorithm); | |
| 96 | 96 | ||
| 97 | 97 | const type = mode === kWebCryptoCipherEncrypt ? 'public' : 'private'; | |
@@ -328,7 +328,7 @@ function rsaImportKey( | |||
| 328 | 328 | }, keyUsages, extractable); | |
| 329 | 329 | } | |
| 330 | 330 | ||
| 331 | - function rsaSignVerify(key, data, { saltLength }, signature) { | ||
| 331 | + async function rsaSignVerify(key, data, { saltLength }, signature) { | ||
| 332 | 332 | const mode = signature === undefined ? kSignJobModeSign : kSignJobModeVerify; | |
| 333 | 333 | const type = mode === kSignJobModeSign ? 'private' : 'public'; | |
| 334 | 334 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -769,7 +769,7 @@ async function unwrapKey( | |||
| 769 | 769 | ); | |
| 770 | 770 | } | |
| 771 | 771 | ||
| 772 | - function signVerify(algorithm, key, data, signature) { | ||
| 772 | + async function signVerify(algorithm, key, data, signature) { | ||
| 773 | 773 | let usage = 'sign'; | |
| 774 | 774 | if (signature !== undefined) { | |
| 775 | 775 | usage = 'verify'; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments