diff options
author | Dmitry Volyntsev <xeioex@nginx.com> | 2025-05-08 17:13:01 -0700 |
---|---|---|
committer | Dmitry Volyntsev <xeioexception@gmail.com> | 2025-05-16 12:15:29 -0700 |
commit | 1b69415d8c29bde08cc4c79dbb4b88827c55d8b9 (patch) | |
tree | c09dd59e1ecfb7a8c65183359c665c2ab74cddd8 /test/harness/webCryptoUtils.js | |
parent | 637fc26eac8622ccf8c73cfa4604e9afe54c3f34 (diff) | |
download | njs-1b69415d8c29bde08cc4c79dbb4b88827c55d8b9.tar.gz njs-1b69415d8c29bde08cc4c79dbb4b88827c55d8b9.zip |
WebCrypto: added ECDH support.
Diffstat (limited to 'test/harness/webCryptoUtils.js')
-rw-r--r-- | test/harness/webCryptoUtils.js | 16 |
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; +} |