@passkeykit/server 2.0.1 → 2.0.2

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.
@@ -12,7 +12,7 @@
12
12
  * $scrypt$ln=17,r=8,p=1$<base64salt>$<base64hash>
13
13
  */
14
14
  import { scrypt as scryptSync } from '@noble/hashes/scrypt';
15
- import { randomBytes } from 'crypto';
15
+ import { randomBytes, timingSafeEqual as tse } from 'crypto';
16
16
  /** Default scrypt parameters (OWASP recommendations for interactive login) */
17
17
  const DEFAULTS = {
18
18
  N: 2 ** 17, // 131072 — CPU/memory cost
@@ -76,6 +76,5 @@ function parsePhc(phc) {
76
76
  function timingSafeEqual(a, b) {
77
77
  if (a.length !== b.length)
78
78
  return false;
79
- const { timingSafeEqual: tse } = require('crypto');
80
79
  return tse(a, b);
81
80
  }
package/dist/password.js CHANGED
@@ -81,6 +81,5 @@ function parsePhc(phc) {
81
81
  function timingSafeEqual(a, b) {
82
82
  if (a.length !== b.length)
83
83
  return false;
84
- const { timingSafeEqual: tse } = require('crypto');
85
- return tse(a, b);
84
+ return (0, crypto_1.timingSafeEqual)(a, b);
86
85
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@passkeykit/server",
3
- "version": "2.0.1",
4
- "description": "Server-side WebAuthn passkey verification \u2014 stateless or stateful, pure JS, works on serverless",
3
+ "version": "2.0.2",
4
+ "description": "Server-side WebAuthn passkey verification stateless or stateful, pure JS, works on serverless",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/index.d.ts",