@byline/admin 0.10.0 → 0.10.1

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.
Files changed (32) hide show
  1. package/dist/modules/auth/password.d.ts.map +1 -1
  2. package/dist/modules/auth/password.js +51 -10
  3. package/dist/modules/auth/password.js.map +1 -1
  4. package/dist/modules/auth/phc.d.ts +45 -0
  5. package/dist/modules/auth/phc.d.ts.map +1 -0
  6. package/dist/modules/auth/phc.js +88 -0
  7. package/dist/modules/auth/phc.js.map +1 -0
  8. package/dist/vendor/noble-argon2/_blake.d.ts +21 -0
  9. package/dist/vendor/noble-argon2/_blake.d.ts.map +1 -0
  10. package/dist/vendor/noble-argon2/_blake.js +53 -0
  11. package/dist/vendor/noble-argon2/_blake.js.map +1 -0
  12. package/dist/vendor/noble-argon2/_md.d.ts +99 -0
  13. package/dist/vendor/noble-argon2/_md.d.ts.map +1 -0
  14. package/dist/vendor/noble-argon2/_md.js +203 -0
  15. package/dist/vendor/noble-argon2/_md.js.map +1 -0
  16. package/dist/vendor/noble-argon2/_u64.d.ts +63 -0
  17. package/dist/vendor/noble-argon2/_u64.d.ts.map +1 -0
  18. package/dist/vendor/noble-argon2/_u64.js +84 -0
  19. package/dist/vendor/noble-argon2/_u64.js.map +1 -0
  20. package/dist/vendor/noble-argon2/argon2.d.ts +112 -0
  21. package/dist/vendor/noble-argon2/argon2.d.ts.map +1 -0
  22. package/dist/vendor/noble-argon2/argon2.js +518 -0
  23. package/dist/vendor/noble-argon2/argon2.js.map +1 -0
  24. package/dist/vendor/noble-argon2/blake2.d.ts +184 -0
  25. package/dist/vendor/noble-argon2/blake2.d.ts.map +1 -0
  26. package/dist/vendor/noble-argon2/blake2.js +502 -0
  27. package/dist/vendor/noble-argon2/blake2.js.map +1 -0
  28. package/dist/vendor/noble-argon2/utils.d.ts +519 -0
  29. package/dist/vendor/noble-argon2/utils.d.ts.map +1 -0
  30. package/dist/vendor/noble-argon2/utils.js +578 -0
  31. package/dist/vendor/noble-argon2/utils.js.map +1 -0
  32. package/package.json +4 -5
@@ -0,0 +1,578 @@
1
+ /**
2
+ * Checks if something is Uint8Array. Be careful: nodejs Buffer will return true.
3
+ * @param a - value to test
4
+ * @returns `true` when the value is a Uint8Array-compatible view.
5
+ * @example
6
+ * Check whether a value is a Uint8Array-compatible view.
7
+ * ```ts
8
+ * isBytes(new Uint8Array([1, 2, 3]));
9
+ * ```
10
+ */
11
+ export function isBytes(a) {
12
+ // Plain `instanceof Uint8Array` is too strict for some Buffer / proxy / cross-realm cases.
13
+ // The fallback still requires a real ArrayBuffer view, so plain
14
+ // JSON-deserialized `{ constructor: ... }` spoofing is rejected, and
15
+ // `BYTES_PER_ELEMENT === 1` keeps the fallback on byte-oriented views.
16
+ return (a instanceof Uint8Array ||
17
+ (ArrayBuffer.isView(a) &&
18
+ a.constructor.name === 'Uint8Array' &&
19
+ 'BYTES_PER_ELEMENT' in a &&
20
+ a.BYTES_PER_ELEMENT === 1));
21
+ }
22
+ /**
23
+ * Asserts something is a non-negative integer.
24
+ * @param n - number to validate
25
+ * @param title - label included in thrown errors
26
+ * @throws On wrong argument types. {@link TypeError}
27
+ * @throws On wrong argument ranges or values. {@link RangeError}
28
+ * @example
29
+ * Validate a non-negative integer option.
30
+ * ```ts
31
+ * anumber(32, 'length');
32
+ * ```
33
+ */
34
+ export function anumber(n, title = '') {
35
+ if (typeof n !== 'number') {
36
+ const prefix = title && `"${title}" `;
37
+ throw new TypeError(`${prefix}expected number, got ${typeof n}`);
38
+ }
39
+ if (!Number.isSafeInteger(n) || n < 0) {
40
+ const prefix = title && `"${title}" `;
41
+ throw new RangeError(`${prefix}expected integer >= 0, got ${n}`);
42
+ }
43
+ }
44
+ /**
45
+ * Asserts something is Uint8Array.
46
+ * @param value - value to validate
47
+ * @param length - optional exact length constraint
48
+ * @param title - label included in thrown errors
49
+ * @returns The validated byte array.
50
+ * @throws On wrong argument types. {@link TypeError}
51
+ * @throws On wrong argument ranges or values. {@link RangeError}
52
+ * @example
53
+ * Validate that a value is a byte array.
54
+ * ```ts
55
+ * abytes(new Uint8Array([1, 2, 3]));
56
+ * ```
57
+ */
58
+ export function abytes(value, length, title = '') {
59
+ const bytes = isBytes(value);
60
+ const len = value?.length;
61
+ const needsLen = length !== undefined;
62
+ if (!bytes || (needsLen && len !== length)) {
63
+ const prefix = title && `"${title}" `;
64
+ const ofLen = needsLen ? ` of length ${length}` : '';
65
+ const got = bytes ? `length=${len}` : `type=${typeof value}`;
66
+ const message = prefix + 'expected Uint8Array' + ofLen + ', got ' + got;
67
+ if (!bytes)
68
+ throw new TypeError(message);
69
+ throw new RangeError(message);
70
+ }
71
+ return value;
72
+ }
73
+ /**
74
+ * Copies bytes into a fresh Uint8Array.
75
+ * Buffer-style slices can alias the same backing store, so callers that need ownership should copy.
76
+ * @param bytes - source bytes to clone
77
+ * @returns Freshly allocated copy of `bytes`.
78
+ * @throws On wrong argument types. {@link TypeError}
79
+ * @example
80
+ * Clone a byte array before mutating it.
81
+ * ```ts
82
+ * const copy = copyBytes(new Uint8Array([1, 2, 3]));
83
+ * ```
84
+ */
85
+ export function copyBytes(bytes) {
86
+ // `Uint8Array.from(...)` would also accept arrays / other typed arrays. Keep this helper strict
87
+ // because callers use it at byte-validation boundaries before mutating the detached copy.
88
+ return Uint8Array.from(abytes(bytes));
89
+ }
90
+ /**
91
+ * Asserts something is a wrapped hash constructor.
92
+ * @param h - hash constructor to validate
93
+ * @throws On wrong argument types or invalid hash wrapper shape. {@link TypeError}
94
+ * @throws On invalid hash metadata ranges or values. {@link RangeError}
95
+ * @throws If the hash metadata allows empty outputs or block sizes. {@link Error}
96
+ * @example
97
+ * Validate a callable hash wrapper.
98
+ * ```ts
99
+ * import { ahash } from '@noble/hashes/utils.js';
100
+ * import { sha256 } from '@noble/hashes/sha2.js';
101
+ * ahash(sha256);
102
+ * ```
103
+ */
104
+ export function ahash(h) {
105
+ if (typeof h !== 'function' || typeof h.create !== 'function')
106
+ throw new TypeError('Hash must wrapped by utils.createHasher');
107
+ anumber(h.outputLen);
108
+ anumber(h.blockLen);
109
+ // HMAC and KDF callers treat these as real byte lengths; allowing zero lets fake wrappers pass
110
+ // validation and can produce empty outputs instead of failing fast.
111
+ if (h.outputLen < 1)
112
+ throw new Error('"outputLen" must be >= 1');
113
+ if (h.blockLen < 1)
114
+ throw new Error('"blockLen" must be >= 1');
115
+ }
116
+ /**
117
+ * Asserts a hash instance has not been destroyed or finished.
118
+ * @param instance - hash instance to validate
119
+ * @param checkFinished - whether to reject finalized instances
120
+ * @throws If the hash instance has already been destroyed or finalized. {@link Error}
121
+ * @example
122
+ * Validate that a hash instance is still usable.
123
+ * ```ts
124
+ * import { aexists } from '@noble/hashes/utils.js';
125
+ * import { sha256 } from '@noble/hashes/sha2.js';
126
+ * const hash = sha256.create();
127
+ * aexists(hash);
128
+ * ```
129
+ */
130
+ export function aexists(instance, checkFinished = true) {
131
+ if (instance.destroyed)
132
+ throw new Error('Hash instance has been destroyed');
133
+ if (checkFinished && instance.finished)
134
+ throw new Error('Hash#digest() has already been called');
135
+ }
136
+ /**
137
+ * Asserts output is a sufficiently-sized byte array.
138
+ * @param out - destination buffer
139
+ * @param instance - hash instance providing output length
140
+ * Oversized buffers are allowed; downstream code only promises to fill the first `outputLen` bytes.
141
+ * @throws On wrong argument types. {@link TypeError}
142
+ * @throws On wrong argument ranges or values. {@link RangeError}
143
+ * @example
144
+ * Validate a caller-provided digest buffer.
145
+ * ```ts
146
+ * import { aoutput } from '@noble/hashes/utils.js';
147
+ * import { sha256 } from '@noble/hashes/sha2.js';
148
+ * const hash = sha256.create();
149
+ * aoutput(new Uint8Array(hash.outputLen), hash);
150
+ * ```
151
+ */
152
+ export function aoutput(out, instance) {
153
+ abytes(out, undefined, 'digestInto() output');
154
+ const min = instance.outputLen;
155
+ if (out.length < min) {
156
+ throw new RangeError('"digestInto() output" expected to be of length >=' + min);
157
+ }
158
+ }
159
+ /**
160
+ * Casts a typed array view to Uint8Array.
161
+ * @param arr - source typed array
162
+ * @returns Uint8Array view over the same buffer.
163
+ * @example
164
+ * Reinterpret a typed array as bytes.
165
+ * ```ts
166
+ * u8(new Uint32Array([1, 2]));
167
+ * ```
168
+ */
169
+ export function u8(arr) {
170
+ return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
171
+ }
172
+ /**
173
+ * Casts a typed array view to Uint32Array.
174
+ * `arr.byteOffset` must already be 4-byte aligned or the platform
175
+ * Uint32Array constructor will throw.
176
+ * @param arr - source typed array
177
+ * @returns Uint32Array view over the same buffer.
178
+ * @example
179
+ * Reinterpret a byte array as 32-bit words.
180
+ * ```ts
181
+ * u32(new Uint8Array(8));
182
+ * ```
183
+ */
184
+ export function u32(arr) {
185
+ return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
186
+ }
187
+ /**
188
+ * Zeroizes typed arrays in place. Warning: JS provides no guarantees.
189
+ * @param arrays - arrays to overwrite with zeros
190
+ * @example
191
+ * Zeroize sensitive buffers in place.
192
+ * ```ts
193
+ * clean(new Uint8Array([1, 2, 3]));
194
+ * ```
195
+ */
196
+ export function clean(...arrays) {
197
+ for (let i = 0; i < arrays.length; i++) {
198
+ arrays[i].fill(0);
199
+ }
200
+ }
201
+ /**
202
+ * Creates a DataView for byte-level manipulation.
203
+ * @param arr - source typed array
204
+ * @returns DataView over the same buffer region.
205
+ * @example
206
+ * Create a DataView over an existing buffer.
207
+ * ```ts
208
+ * createView(new Uint8Array(4));
209
+ * ```
210
+ */
211
+ export function createView(arr) {
212
+ return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
213
+ }
214
+ /**
215
+ * Rotate-right operation for uint32 values.
216
+ * @param word - source word
217
+ * @param shift - shift amount in bits
218
+ * @returns Rotated word.
219
+ * @example
220
+ * Rotate a 32-bit word to the right.
221
+ * ```ts
222
+ * rotr(0x12345678, 8);
223
+ * ```
224
+ */
225
+ export function rotr(word, shift) {
226
+ return (word << (32 - shift)) | (word >>> shift);
227
+ }
228
+ /**
229
+ * Rotate-left operation for uint32 values.
230
+ * @param word - source word
231
+ * @param shift - shift amount in bits
232
+ * @returns Rotated word.
233
+ * @example
234
+ * Rotate a 32-bit word to the left.
235
+ * ```ts
236
+ * rotl(0x12345678, 8);
237
+ * ```
238
+ */
239
+ export function rotl(word, shift) {
240
+ return (word << shift) | ((word >>> (32 - shift)) >>> 0);
241
+ }
242
+ /** Whether the current platform is little-endian. */
243
+ export const isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();
244
+ /**
245
+ * Byte-swap operation for uint32 values.
246
+ * @param word - source word
247
+ * @returns Word with reversed byte order.
248
+ * @example
249
+ * Reverse the byte order of a 32-bit word.
250
+ * ```ts
251
+ * byteSwap(0x11223344);
252
+ * ```
253
+ */
254
+ export function byteSwap(word) {
255
+ return (((word << 24) & 0xff000000) |
256
+ ((word << 8) & 0xff0000) |
257
+ ((word >>> 8) & 0xff00) |
258
+ ((word >>> 24) & 0xff));
259
+ }
260
+ /**
261
+ * Conditionally byte-swaps one 32-bit word on big-endian platforms.
262
+ * @param n - source word
263
+ * @returns Original or byte-swapped word depending on platform endianness.
264
+ * @example
265
+ * Normalize a 32-bit word for host endianness.
266
+ * ```ts
267
+ * swap8IfBE(0x11223344);
268
+ * ```
269
+ */
270
+ export const swap8IfBE = isLE
271
+ ? (n) => n
272
+ : (n) => byteSwap(n) >>> 0;
273
+ /**
274
+ * Byte-swaps every word of a Uint32Array in place.
275
+ * @param arr - array to mutate
276
+ * @returns The same array after mutation; callers pass live state arrays here.
277
+ * @example
278
+ * Reverse the byte order of every word in place.
279
+ * ```ts
280
+ * byteSwap32(new Uint32Array([0x11223344]));
281
+ * ```
282
+ */
283
+ export function byteSwap32(arr) {
284
+ for (let i = 0; i < arr.length; i++) {
285
+ arr[i] = byteSwap(arr[i]);
286
+ }
287
+ return arr;
288
+ }
289
+ /**
290
+ * Conditionally byte-swaps a Uint32Array on big-endian platforms.
291
+ * @param u - array to normalize for host endianness
292
+ * @returns Original or byte-swapped array depending on platform endianness.
293
+ * On big-endian runtimes this mutates `u` in place via `byteSwap32(...)`.
294
+ * @example
295
+ * Normalize a word array for host endianness.
296
+ * ```ts
297
+ * swap32IfBE(new Uint32Array([0x11223344]));
298
+ * ```
299
+ */
300
+ export const swap32IfBE = isLE
301
+ ? (u) => u
302
+ : byteSwap32;
303
+ // Built-in hex conversion https://caniuse.com/mdn-javascript_builtins_uint8array_fromhex
304
+ const hasHexBuiltin = /* @__PURE__ */ (() =>
305
+ // @ts-ignore
306
+ typeof Uint8Array.from([]).toHex === 'function' && typeof Uint8Array.fromHex === 'function')();
307
+ // Array where index 0xf0 (240) is mapped to string 'f0'
308
+ const hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));
309
+ /**
310
+ * Convert byte array to hex string.
311
+ * Uses the built-in function when available and assumes it matches the tested
312
+ * fallback semantics.
313
+ * @param bytes - bytes to encode
314
+ * @returns Lowercase hexadecimal string.
315
+ * @throws On wrong argument types. {@link TypeError}
316
+ * @example
317
+ * Convert bytes to lowercase hexadecimal.
318
+ * ```ts
319
+ * bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])); // 'cafe0123'
320
+ * ```
321
+ */
322
+ export function bytesToHex(bytes) {
323
+ abytes(bytes);
324
+ // @ts-ignore
325
+ if (hasHexBuiltin)
326
+ return bytes.toHex();
327
+ // pre-caching improves the speed 6x
328
+ let hex = '';
329
+ for (let i = 0; i < bytes.length; i++) {
330
+ hex += hexes[bytes[i]];
331
+ }
332
+ return hex;
333
+ }
334
+ // We use optimized technique to convert hex string to byte array
335
+ const asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
336
+ function asciiToBase16(ch) {
337
+ if (ch >= asciis._0 && ch <= asciis._9)
338
+ return ch - asciis._0; // '2' => 50-48
339
+ if (ch >= asciis.A && ch <= asciis.F)
340
+ return ch - (asciis.A - 10); // 'B' => 66-(65-10)
341
+ if (ch >= asciis.a && ch <= asciis.f)
342
+ return ch - (asciis.a - 10); // 'b' => 98-(97-10)
343
+ return;
344
+ }
345
+ /**
346
+ * Convert hex string to byte array. Uses built-in function, when available.
347
+ * @param hex - hexadecimal string to decode
348
+ * @returns Decoded bytes.
349
+ * @throws On wrong argument types. {@link TypeError}
350
+ * @throws On wrong argument ranges or values. {@link RangeError}
351
+ * @example
352
+ * Decode lowercase hexadecimal into bytes.
353
+ * ```ts
354
+ * hexToBytes('cafe0123'); // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])
355
+ * ```
356
+ */
357
+ export function hexToBytes(hex) {
358
+ if (typeof hex !== 'string')
359
+ throw new TypeError('hex string expected, got ' + typeof hex);
360
+ if (hasHexBuiltin) {
361
+ try {
362
+ return Uint8Array.fromHex(hex);
363
+ }
364
+ catch (error) {
365
+ if (error instanceof SyntaxError)
366
+ throw new RangeError(error.message);
367
+ throw error;
368
+ }
369
+ }
370
+ const hl = hex.length;
371
+ const al = hl / 2;
372
+ if (hl % 2)
373
+ throw new RangeError('hex string expected, got unpadded hex of length ' + hl);
374
+ const array = new Uint8Array(al);
375
+ for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
376
+ const n1 = asciiToBase16(hex.charCodeAt(hi));
377
+ const n2 = asciiToBase16(hex.charCodeAt(hi + 1));
378
+ if (n1 === undefined || n2 === undefined) {
379
+ const char = hex[hi] + hex[hi + 1];
380
+ throw new RangeError('hex string expected, got non-hex character "' + char + '" at index ' + hi);
381
+ }
382
+ array[ai] = n1 * 16 + n2; // multiply first octet, e.g. 'a3' => 10*16+3 => 160 + 3 => 163
383
+ }
384
+ return array;
385
+ }
386
+ /**
387
+ * There is no setImmediate in browser and setTimeout is slow.
388
+ * This yields to the Promise/microtask scheduler queue, not to timers or the
389
+ * full macrotask event loop.
390
+ * @example
391
+ * Yield to the next scheduler tick.
392
+ * ```ts
393
+ * await nextTick();
394
+ * ```
395
+ */
396
+ export const nextTick = async () => { };
397
+ /**
398
+ * Returns control to the Promise/microtask scheduler every `tick`
399
+ * milliseconds to avoid blocking long loops.
400
+ * @param iters - number of loop iterations to run
401
+ * @param tick - maximum time slice in milliseconds
402
+ * @param cb - callback executed on each iteration
403
+ * @example
404
+ * Run a loop that periodically yields back to the event loop.
405
+ * ```ts
406
+ * await asyncLoop(2, 0, () => {});
407
+ * ```
408
+ */
409
+ export async function asyncLoop(iters, tick, cb) {
410
+ let ts = Date.now();
411
+ for (let i = 0; i < iters; i++) {
412
+ cb(i);
413
+ // Date.now() is not monotonic, so in case if clock goes backwards we return return control too
414
+ const diff = Date.now() - ts;
415
+ if (diff >= 0 && diff < tick)
416
+ continue;
417
+ await nextTick();
418
+ ts += diff;
419
+ }
420
+ }
421
+ /**
422
+ * Converts string to bytes using UTF8 encoding.
423
+ * Built-in doesn't validate input to be string: we do the check.
424
+ * Non-ASCII details are delegated to the platform `TextEncoder`.
425
+ * @param str - string to encode
426
+ * @returns UTF-8 encoded bytes.
427
+ * @throws On wrong argument types. {@link TypeError}
428
+ * @example
429
+ * Encode a string as UTF-8 bytes.
430
+ * ```ts
431
+ * utf8ToBytes('abc'); // Uint8Array.from([97, 98, 99])
432
+ * ```
433
+ */
434
+ export function utf8ToBytes(str) {
435
+ if (typeof str !== 'string')
436
+ throw new TypeError('string expected');
437
+ return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809
438
+ }
439
+ /**
440
+ * Helper for KDFs: consumes Uint8Array or string.
441
+ * String inputs are UTF-8 encoded; byte-array inputs stay aliased to the caller buffer.
442
+ * @param data - user-provided KDF input
443
+ * @param errorTitle - label included in thrown errors
444
+ * @returns Byte representation of the input.
445
+ * @throws On wrong argument types. {@link TypeError}
446
+ * @example
447
+ * Normalize KDF input to bytes.
448
+ * ```ts
449
+ * kdfInputToBytes('password');
450
+ * ```
451
+ */
452
+ export function kdfInputToBytes(data, errorTitle = '') {
453
+ if (typeof data === 'string')
454
+ return utf8ToBytes(data);
455
+ return abytes(data, undefined, errorTitle);
456
+ }
457
+ /**
458
+ * Copies several Uint8Arrays into one.
459
+ * @param arrays - arrays to concatenate
460
+ * @returns Concatenated byte array.
461
+ * @throws On wrong argument types. {@link TypeError}
462
+ * @example
463
+ * Concatenate multiple byte arrays.
464
+ * ```ts
465
+ * concatBytes(new Uint8Array([1]), new Uint8Array([2]));
466
+ * ```
467
+ */
468
+ export function concatBytes(...arrays) {
469
+ let sum = 0;
470
+ for (let i = 0; i < arrays.length; i++) {
471
+ const a = arrays[i];
472
+ abytes(a);
473
+ sum += a.length;
474
+ }
475
+ const res = new Uint8Array(sum);
476
+ for (let i = 0, pad = 0; i < arrays.length; i++) {
477
+ const a = arrays[i];
478
+ res.set(a, pad);
479
+ pad += a.length;
480
+ }
481
+ return res;
482
+ }
483
+ /**
484
+ * Merges default options and passed options.
485
+ * @param defaults - base option object
486
+ * @param opts - user overrides
487
+ * @returns Merged option object. The merge mutates `defaults` in place.
488
+ * @throws On wrong argument types. {@link TypeError}
489
+ * @example
490
+ * Merge user overrides onto default options.
491
+ * ```ts
492
+ * checkOpts({ dkLen: 32 }, { asyncTick: 10 });
493
+ * ```
494
+ */
495
+ export function checkOpts(defaults, opts) {
496
+ if (opts !== undefined && {}.toString.call(opts) !== '[object Object]')
497
+ throw new TypeError('options must be object or undefined');
498
+ const merged = Object.assign(defaults, opts);
499
+ return merged;
500
+ }
501
+ /**
502
+ * Creates a callable hash function from a stateful class constructor.
503
+ * @param hashCons - hash constructor or factory
504
+ * @param info - optional metadata such as DER OID
505
+ * @returns Frozen callable hash wrapper with `.create()`.
506
+ * Wrapper construction eagerly calls `hashCons(undefined)` once to read
507
+ * `outputLen` / `blockLen`, so constructor side effects happen at module
508
+ * init time.
509
+ * @example
510
+ * Wrap a stateful hash constructor into a callable helper.
511
+ * ```ts
512
+ * import { createHasher } from '@noble/hashes/utils.js';
513
+ * import { sha256 } from '@noble/hashes/sha2.js';
514
+ * const wrapped = createHasher(sha256.create, { oid: sha256.oid });
515
+ * wrapped(new Uint8Array([1]));
516
+ * ```
517
+ */
518
+ export function createHasher(hashCons, info = {}) {
519
+ const hashC = (msg, opts) => hashCons(opts)
520
+ .update(msg)
521
+ .digest();
522
+ const tmp = hashCons(undefined);
523
+ hashC.outputLen = tmp.outputLen;
524
+ hashC.blockLen = tmp.blockLen;
525
+ hashC.canXOF = tmp.canXOF;
526
+ hashC.create = (opts) => hashCons(opts);
527
+ Object.assign(hashC, info);
528
+ return Object.freeze(hashC);
529
+ }
530
+ /**
531
+ * Cryptographically secure PRNG backed by `crypto.getRandomValues`.
532
+ * @param bytesLength - number of random bytes to generate
533
+ * @returns Random bytes.
534
+ * The platform `getRandomValues()` implementation still defines any
535
+ * single-call length cap, and this helper rejects oversize requests
536
+ * with a stable library `RangeError` instead of host-specific errors.
537
+ * @throws On wrong argument types. {@link TypeError}
538
+ * @throws On wrong argument ranges or values. {@link RangeError}
539
+ * @throws If the current runtime does not provide `crypto.getRandomValues`. {@link Error}
540
+ * @example
541
+ * Generate a fresh random key or nonce.
542
+ * ```ts
543
+ * const key = randomBytes(16);
544
+ * ```
545
+ */
546
+ export function randomBytes(bytesLength = 32) {
547
+ // Match the repo's other length-taking helpers instead of relying on Uint8Array coercion.
548
+ anumber(bytesLength, 'bytesLength');
549
+ const cr = typeof globalThis === 'object' ? globalThis.crypto : null;
550
+ if (typeof cr?.getRandomValues !== 'function')
551
+ throw new Error('crypto.getRandomValues must be defined');
552
+ // Web Cryptography API Level 2 §10.1.1:
553
+ // if `byteLength > 65536`, throw `QuotaExceededError`.
554
+ // Keep the guard explicit so callers can see the quota in code
555
+ // instead of discovering it by reading the spec or host errors.
556
+ // This wrapper surfaces the same quota as a stable library RangeError.
557
+ if (bytesLength > 65536)
558
+ throw new RangeError(`"bytesLength" expected <= 65536, got ${bytesLength}`);
559
+ return cr.getRandomValues(new Uint8Array(bytesLength));
560
+ }
561
+ /**
562
+ * Creates OID metadata for NIST hashes with prefix `06 09 60 86 48 01 65 03 04 02`.
563
+ * @param suffix - final OID byte for the selected hash.
564
+ * The helper accepts any byte even though only the documented NIST hash
565
+ * suffixes are meaningful downstream.
566
+ * @returns Object containing the DER-encoded OID.
567
+ * @example
568
+ * Build OID metadata for a NIST hash.
569
+ * ```ts
570
+ * oidNist(0x01);
571
+ * ```
572
+ */
573
+ export const oidNist = (suffix) => ({
574
+ // Current NIST hashAlgs suffixes used here fit in one DER subidentifier octet.
575
+ // Larger suffix values would need base-128 OID encoding and a different length byte.
576
+ oid: Uint8Array.from([0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, suffix]),
577
+ });
578
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/vendor/noble-argon2/utils.ts"],"names":[],"mappings":"AA+GA;;;;;;;;;GASG;AACH,MAAM,UAAU,OAAO,CAAC,CAAU;IAChC,2FAA2F;IAC3F,gEAAgE;IAChE,qEAAqE;IACrE,uEAAuE;IACvE,OAAO,CACL,CAAC,YAAY,UAAU;QACvB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YACpB,CAAC,CAAC,WAAW,CAAC,IAAI,KAAK,YAAY;YACnC,mBAAmB,IAAI,CAAC;YACxB,CAAC,CAAC,iBAAiB,KAAK,CAAC,CAAC,CAC7B,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,OAAO,CAAC,CAAS,EAAE,QAAgB,EAAE;IACnD,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAG,KAAK,IAAI,IAAI,KAAK,IAAI,CAAC;QACtC,MAAM,IAAI,SAAS,CAAC,GAAG,MAAM,wBAAwB,OAAO,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACtC,MAAM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QACrB,MAAM,IAAI,UAAU,CAAC,wCAAwC,WAAW,EAAE,CAAC,CAAC;IAC9E,OAAO,EAAE,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,MAAc,EAA4B,EAAE,CAAC,CAAC;IACpE,+EAA+E;IAC/E,qFAAqF;IACrF,GAAG,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;CAC3F,CAAC,CAAC"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@byline/admin",
3
3
  "private": false,
4
4
  "license": "MPL-2.0",
5
- "version": "0.10.0",
5
+ "version": "0.10.1",
6
6
  "engines": {
7
7
  "node": ">=20.9.0"
8
8
  },
@@ -65,19 +65,18 @@
65
65
  "dist"
66
66
  ],
67
67
  "dependencies": {
68
- "@node-rs/argon2": "^2.0.2",
69
68
  "jose": "^6.2.3",
70
- "npm-run-all": "^4.1.5",
71
69
  "uuid": "^14.0.0",
72
70
  "zod": "^4.4.2",
73
- "@byline/auth": "0.10.0",
74
- "@byline/core": "0.10.0"
71
+ "@byline/auth": "0.10.1",
72
+ "@byline/core": "0.10.1"
75
73
  },
76
74
  "devDependencies": {
77
75
  "@biomejs/biome": "2.4.14",
78
76
  "@types/node": "^25.6.0",
79
77
  "chokidar": "^5.0.0",
80
78
  "chokidar-cli": "^3.0.0",
79
+ "npm-run-all": "^4.1.5",
81
80
  "rimraf": "^6.1.3",
82
81
  "tsc-alias": "^1.8.17",
83
82
  "tsx": "^4.21.0",