|
2 | 2 |
|
3 | 3 | const{ |
4 | 4 | ArrayPrototypeIncludes, |
| 5 | + FunctionPrototypeCall, |
5 | 6 | JSONParse, |
6 | 7 | JSONStringify, |
7 | 8 | ObjectDefineProperties, |
@@ -84,7 +85,7 @@ async function digest(algorithm, data) { |
84 | 85 |
|
85 | 86 | algorithm=normalizeAlgorithm(algorithm,'digest'); |
86 | 87 |
|
87 | | -returnawaitReflectApply(asyncDigest,this,[algorithm,data]); |
| 88 | +returnawaitFunctionPrototypeCall(asyncDigest,this,algorithm,data); |
88 | 89 | } |
89 | 90 |
|
90 | 91 | functionrandomUUID(){ |
@@ -377,10 +378,10 @@ async function deriveKey( |
377 | 378 | throwlazyDOMException('Unrecognized algorithm name','NotSupportedError'); |
378 | 379 | } |
379 | 380 |
|
380 | | -returnReflectApply( |
| 381 | +returnFunctionPrototypeCall( |
381 | 382 | importKeySync, |
382 | 383 | this, |
383 | | -['raw-secret',bits,derivedKeyAlgorithm,extractable,keyUsages], |
| 384 | +'raw-secret',bits,derivedKeyAlgorithm,extractable,keyUsages, |
384 | 385 | ); |
385 | 386 | } |
386 | 387 |
|
@@ -889,10 +890,10 @@ async function importKey( |
889 | 890 |
|
890 | 891 | algorithm=normalizeAlgorithm(algorithm,'importKey'); |
891 | 892 |
|
892 | | -returnReflectApply( |
| 893 | +returnFunctionPrototypeCall( |
893 | 894 | importKeySync, |
894 | 895 | this, |
895 | | -[format,keyData,algorithm,extractable,keyUsages], |
| 896 | +format,keyData,algorithm,extractable,keyUsages, |
896 | 897 | ); |
897 | 898 | } |
898 | 899 |
|
@@ -926,7 +927,7 @@ async function wrapKey(format, key, wrappingKey, algorithm) { |
926 | 927 | }catch{ |
927 | 928 | algorithm=normalizeAlgorithm(algorithm,'encrypt'); |
928 | 929 | } |
929 | | -letkeyData=awaitReflectApply(exportKey,this,[format,key]); |
| 930 | +letkeyData=awaitFunctionPrototypeCall(exportKey,this,format,key); |
930 | 931 |
|
931 | 932 | if(format==='jwk'){ |
932 | 933 | constec=newTextEncoder(); |
@@ -1023,10 +1024,10 @@ async function unwrapKey( |
1023 | 1024 | } |
1024 | 1025 | } |
1025 | 1026 |
|
1026 | | -returnReflectApply( |
| 1027 | +returnFunctionPrototypeCall( |
1027 | 1028 | importKeySync, |
1028 | 1029 | this, |
1029 | | -[format,keyData,unwrappedKeyAlgo,extractable,keyUsages], |
| 1030 | +format,keyData,unwrappedKeyAlgo,extractable,keyUsages, |
1030 | 1031 | ); |
1031 | 1032 | } |
1032 | 1033 |
|
@@ -1349,10 +1350,10 @@ async function encapsulateKey(encapsulationAlgorithm, encapsulationKey, sharedKe |
1349 | 1350 | throwlazyDOMException('Unrecognized algorithm name','NotSupportedError'); |
1350 | 1351 | } |
1351 | 1352 |
|
1352 | | -constsharedKey=ReflectApply( |
| 1353 | +constsharedKey=FunctionPrototypeCall( |
1353 | 1354 | importKeySync, |
1354 | 1355 | this, |
1355 | | -['raw-secret',encapsulateBits.sharedKey,normalizedSharedKeyAlgorithm,extractable,usages], |
| 1356 | +'raw-secret',encapsulateBits.sharedKey,normalizedSharedKeyAlgorithm,extractable,usages, |
1356 | 1357 | ); |
1357 | 1358 |
|
1358 | 1359 | constencapsulatedKey={ |
@@ -1469,10 +1470,10 @@ async function decapsulateKey( |
1469 | 1470 | throwlazyDOMException('Unrecognized algorithm name','NotSupportedError'); |
1470 | 1471 | } |
1471 | 1472 |
|
1472 | | -returnReflectApply( |
| 1473 | +returnFunctionPrototypeCall( |
1473 | 1474 | importKeySync, |
1474 | 1475 | this, |
1475 | | -['raw-secret',decapsulatedBits,normalizedSharedKeyAlgorithm,extractable,usages], |
| 1476 | +'raw-secret',decapsulatedBits,normalizedSharedKeyAlgorithm,extractable,usages, |
1476 | 1477 | ); |
1477 | 1478 | } |
1478 | 1479 |
|
|
0 commit comments