aboutsummaryrefslogtreecommitdiff
path: root/test/harness/webCryptoUtils.js
diff options
context:
space:
mode:
authorDmitry Volyntsev <xeioex@nginx.com>2025-05-08 17:13:01 -0700
committerDmitry Volyntsev <xeioexception@gmail.com>2025-05-16 12:15:29 -0700
commit1b69415d8c29bde08cc4c79dbb4b88827c55d8b9 (patch)
treec09dd59e1ecfb7a8c65183359c665c2ab74cddd8 /test/harness/webCryptoUtils.js
parent637fc26eac8622ccf8c73cfa4604e9afe54c3f34 (diff)
downloadnjs-1b69415d8c29bde08cc4c79dbb4b88827c55d8b9.tar.gz
njs-1b69415d8c29bde08cc4c79dbb4b88827c55d8b9.zip
WebCrypto: added ECDH support.
Diffstat (limited to 'test/harness/webCryptoUtils.js')
-rw-r--r--test/harness/webCryptoUtils.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/harness/webCryptoUtils.js b/test/harness/webCryptoUtils.js
index d403f39a..c37fb489 100644
--- a/test/harness/webCryptoUtils.js
+++ b/test/harness/webCryptoUtils.js
@@ -19,3 +19,19 @@ function load_jwk(data) {
return data;
}
+
+function compareUsage(a, b) {
+ a.sort();
+ b.sort();
+
+ if (b.length !== a.length) {
+ return false;
+ }
+
+ for (var i = 0; i < a.length; i++) {
+ if (b[i] !== a[i]) {
+ return false;
+ }
+ }
+ return true;
+}