ns-auth-sdk 1.14.2 → 1.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -214,7 +214,7 @@ async function checkPRFSupport() {
214
214
  }
215
215
  }
216
216
  async function generatePasswordProtectedKey(password) {
217
- const privateKey = _noble_curves_secp256k1_js.secp256k1.utils.randomPrivateKey();
217
+ const privateKey = _noble_curves_secp256k1_js.secp256k1.utils.randomSecretKey();
218
218
  const publicKeySpkiBase64 = toBase64(_noble_curves_secp256k1_js.secp256k1.getPublicKey(privateKey));
219
219
  const salt = (0, _noble_hashes_utils_js.randomBytes)(16);
220
220
  const derivedKey = (0, _noble_hashes_pbkdf2_js.pbkdf2)(_noble_hashes_sha2_js.sha256, new TextEncoder().encode(password), salt, {
@@ -11258,7 +11258,7 @@ async function generateSiopIdToken(config) {
11258
11258
  };
11259
11259
  const signingInput = `${base64urlEncode$1(new TextEncoder().encode(JSON.stringify(header)))}.${base64urlEncode$1(new TextEncoder().encode(JSON.stringify(payload)))}`;
11260
11260
  const messageHash = (0, _noble_hashes_sha2_js.sha256)(new TextEncoder().encode(signingInput));
11261
- return `${signingInput}.${base64urlEncode$1(_noble_curves_secp256k1_js.secp256k1.sign(messageHash, secretKey).toCompactRawBytes())}`;
11261
+ return `${signingInput}.${base64urlEncode$1(_noble_curves_secp256k1_js.secp256k1.sign(messageHash, secretKey).toBytes())}`;
11262
11262
  }
11263
11263
  /**
11264
11264
  * Verify a SIOP v2 Self-Issued ID Token