{"version":3,"file":"index.mjs","sources":["../src/errors.ts","../src/operation-options.ts","../src/bytes.ts","../src/derived-key.ts","../src/aead.ts","../src/transform.ts","../src/registry.ts","../src/random.ts","../src/blocks.ts"],"sourcesContent":["export class CryptoError extends Error {\n  constructor(message: string) {\n    super(message);\n    this.name = new.target.name;\n  }\n}\n\nexport class DuplicateComponentError extends CryptoError {\n  constructor(kind: string, name: string) {\n    super(`Component already registered: ${kind}:${name}`);\n  }\n}\n\nexport class MissingComponentError extends CryptoError {\n  constructor(kind: string, name: string) {\n    super(`Component not found: ${kind}:${name}`);\n  }\n}\n\n","/**\n * Per-operation options for cipher facades.\n * Core only forwards these to mode/cipher components; mode-specific keys such as\n * `nonce`, `aad`, `tag`, and `tagLength` belong to the mode implementation.\n */\nexport type CipherOperationOptions = Record<string, unknown>;\n\nexport interface DerivedKeyCipherOperationOptions extends CipherOperationOptions {\n  salt?: Uint8Array | string | null;\n}\n\n/** Keys that must not be overridden by operation options. */\nexport const RESERVED_OPERATION_OPTION_KEYS = [\n  'cipher',\n  'mode',\n  'padding',\n  'key',\n  'kdf',\n  'format',\n  'keySize',\n  'ivSize',\n  'saltSize',\n] as const;\n\nexport function assertNoReservedOperationOptions(\n  options: Record<string, unknown> | undefined,\n): void {\n  if (!options) {\n    return;\n  }\n  for (const key of RESERVED_OPERATION_OPTION_KEYS) {\n    if (Object.prototype.hasOwnProperty.call(options, key)) {\n      throw new Error(`operation options must not override reserved key: ${key}`);\n    }\n  }\n}\n","export function concatBytes(...chunks: readonly Uint8Array[]): Uint8Array {\n  const length = chunks.reduce((sum, chunk) => sum + chunk.length, 0);\n  const output = new Uint8Array(length);\n  let offset = 0;\n\n  for (const chunk of chunks) {\n    output.set(chunk, offset);\n    offset += chunk.length;\n  }\n\n  return output;\n}\n\nexport function equalBytes(a: Uint8Array, b: Uint8Array): boolean {\n  if (a.length !== b.length) {\n    return false;\n  }\n\n  let diff = 0;\n  for (let i = 0; i < a.length; i++) {\n    diff |= a[i] ^ b[i];\n  }\n  return diff === 0;\n}\n\nexport function xorBytes(a: Uint8Array, b: Uint8Array): Uint8Array {\n  if (a.length !== b.length) {\n    throw new Error('XOR inputs must have the same length.');\n  }\n\n  const output = new Uint8Array(a.length);\n  for (let i = 0; i < a.length; i++) {\n    output[i] = a[i] ^ b[i];\n  }\n  return output;\n}\n\nexport function assertBytes(value: unknown, name: string): asserts value is Uint8Array {\n  if (!(value instanceof Uint8Array)) {\n    throw new TypeError(`${name} must be a Uint8Array.`);\n  }\n}\n","import type {\n  BlockCipherComponent,\n  CipherComponent,\n  AeadComponent,\n  FormatComponent,\n  KdfComponent,\n  ModeComponent,\n  Transform,\n} from './component.js';\nimport type {\n  AeadFacade,\n  AeadOpenOperationOptions,\n  AeadSealOperationOptions,\n  CreateAeadOptions,\n} from './aead.js';\nimport type { DerivedKeyCipherOperationOptions } from './operation-options.js';\nimport { assertNoReservedOperationOptions } from './operation-options.js';\nimport type { Registry } from './registry.js';\nimport type { CreateTransformOptions } from './transform.js';\nimport { concatBytes } from './bytes.js';\n\nexport interface DeriveOptions {\n  name: string;\n  length: number;\n  input?: Uint8Array | string;\n  [key: string]: unknown;\n}\n\nexport interface KdfOptions {\n  name: string;\n  [option: string]: unknown;\n}\n\nexport interface FormatOptions {\n  name: string;\n  [option: string]: unknown;\n}\n\nexport interface CreateDerivedKeyCipherOptions {\n  cipher: string;\n  mode?: string;\n  padding?: string;\n  format?: string | (FormatOptions & { saltSize?: number });\n  kdf: Omit<DeriveOptions, 'length'> & { length?: number };\n  keySize?: number;\n  [key: string]: unknown;\n}\n\nexport interface CreateDerivedKeyAeadOptions {\n  algorithm: string;\n  format?: string | (FormatOptions & { saltSize?: number });\n  kdf: Omit<DeriveOptions, 'length'> & { length?: number };\n  keySize?: number;\n  [key: string]: unknown;\n}\n\nexport interface DerivedKeyCipherFacade {\n  encrypt(plaintext: Uint8Array, options?: DerivedKeyCipherOperationOptions): Uint8Array;\n  decrypt(input: Uint8Array, options?: DerivedKeyCipherOperationOptions): Uint8Array;\n  createEncryptor(options?: DerivedKeyCipherOperationOptions): Transform;\n  createDecryptor(options?: DerivedKeyCipherOperationOptions): Transform;\n}\n\nexport interface DerivedKeyAeadSealOperationOptions extends AeadSealOperationOptions {\n  salt?: Uint8Array | string | null;\n}\n\nexport interface DerivedKeyAeadOpenOperationOptions extends AeadOpenOperationOptions {\n  salt?: Uint8Array | string | null;\n}\n\nexport interface DerivedKeyAeadFacade {\n  seal(plaintext: Uint8Array, options?: DerivedKeyAeadSealOperationOptions): Uint8Array;\n  open(ciphertext: Uint8Array, options?: DerivedKeyAeadOpenOperationOptions): Uint8Array;\n  createSealer(options?: DerivedKeyAeadSealOperationOptions): Transform;\n  createOpener(options?: DerivedKeyAeadOpenOperationOptions): Transform;\n}\n\nexport function derive(\n  registry: Registry,\n  options: DeriveOptions,\n): Uint8Array {\n  const { name, ...params } = options;\n  const kdf = registry.get<'kdf', KdfComponent>('kdf', name);\n  const result = kdf.derive(params, {\n    getHash: registry.getHash.bind(registry),\n  });\n  if (!(result instanceof Uint8Array)) {\n    throw new TypeError(`KDF ${name} must return a Uint8Array.`);\n  }\n  return result;\n}\n\nexport function createDerivedKeyCipher(\n  registry: Registry,\n  options: CreateDerivedKeyCipherOptions,\n): DerivedKeyCipherFacade {\n  assertDerivedKeyOptions(options);\n\n  return {\n    encrypt(plaintext, operationOptions) {\n      return concatBytes(this.createEncryptor(operationOptions).finalize(plaintext));\n    },\n\n    decrypt(input, operationOptions) {\n      return concatBytes(this.createDecryptor(operationOptions).finalize(input));\n    },\n\n    createEncryptor(operationOptions) {\n      return createDerivedKeyEncryptor(registry, options, operationOptions);\n    },\n\n    createDecryptor(operationOptions) {\n      return createDerivedKeyDecryptor(registry, options, operationOptions);\n    },\n  };\n}\n\nexport function createDerivedKeyAead(\n  registry: Registry,\n  options: CreateDerivedKeyAeadOptions,\n): DerivedKeyAeadFacade {\n  assertDerivedKeyOptions(options, 'createDerivedKeyAead');\n\n  function createSealer(operationOptions?: DerivedKeyAeadSealOperationOptions): Transform {\n    return createDerivedKeyAeadSealer(registry, options, operationOptions);\n  }\n\n  function createOpener(operationOptions?: DerivedKeyAeadOpenOperationOptions): Transform {\n    return createDerivedKeyAeadOpener(registry, options, operationOptions);\n  }\n\n  return {\n    seal(plaintext, operationOptions) {\n      return concatBytes(createSealer(operationOptions).finalize(plaintext));\n    },\n\n    open(ciphertext, operationOptions) {\n      return concatBytes(createOpener(operationOptions).finalize(ciphertext));\n    },\n\n    createSealer,\n    createOpener,\n  };\n}\n\nfunction createDerivedKeyEncryptor(\n  registry: Registry,\n  options: CreateDerivedKeyCipherOptions,\n  operationOptions?: DerivedKeyCipherOperationOptions,\n): Transform {\n  const formatOptions = resolveFormatOptions(options.format);\n  const format = resolveFormat(registry, formatOptions);\n  const salt = resolveSalt(options, operationOptions);\n  const { key, iv } = deriveKeyIv(registry, options, salt);\n  const encryptor = registry.createCipher(toTransformOptions(options, key, iv, operationOptions)).createEncryptor();\n\n  if (!format) {\n    return encryptor;\n  }\n\n  if (!isStreamingOpenSslFormat(format)) {\n    return createBufferedFormatEncryptor(format, salt, encryptor);\n  }\n\n  let emittedHeader = false;\n  const emitHeader = (): Uint8Array => {\n    if (emittedHeader) {\n      return new Uint8Array(0);\n    }\n    emittedHeader = true;\n    return format.stringify({ ciphertext: new Uint8Array(0), salt });\n  };\n\n  return {\n    process(input) {\n      return concatBytes(emitHeader(), encryptor.process(input));\n    },\n\n    finalize(input = new Uint8Array(0)) {\n      return concatBytes(emitHeader(), encryptor.finalize(input));\n    },\n  };\n}\n\nfunction createDerivedKeyDecryptor(\n  registry: Registry,\n  options: CreateDerivedKeyCipherOptions,\n  operationOptions?: DerivedKeyCipherOperationOptions,\n): Transform {\n  const formatOptions = resolveFormatOptions(options.format);\n  const format = resolveFormat(registry, formatOptions);\n\n  if (!format) {\n    const salt = resolveSalt(options, operationOptions);\n    const { key, iv } = deriveKeyIv(registry, options, salt);\n    return registry.createCipher(toTransformOptions(options, key, iv, operationOptions)).createDecryptor();\n  }\n\n  if (!isStreamingOpenSslFormat(format)) {\n    return createBufferedFormatDecryptor(registry, options, format, operationOptions);\n  }\n\n  let header = new Uint8Array(0);\n  let decryptor: Transform | undefined;\n\n  const initDecryptor = (input: Uint8Array): Uint8Array => {\n    if (decryptor) {\n      return input;\n    }\n\n    header = new Uint8Array(concatBytes(header, input));\n    if (header.length < 16) {\n      return new Uint8Array(0);\n    }\n\n    const parsed = format.parse(header.slice(0, 16));\n    const hasSalt = parsed.salt !== undefined;\n    const salt = hasSalt ? parsed.salt! : resolveOpenSslDecryptSaltWithoutHeader(options, operationOptions);\n    const ciphertext = hasSalt ? concatBytes(parsed.ciphertext, header.slice(16)) : header;\n    const { key, iv } = deriveKeyIv(registry, options, salt);\n    decryptor = registry.createCipher(toTransformOptions(options, key, iv, operationOptions)).createDecryptor();\n    header = new Uint8Array(0);\n    return ciphertext;\n  };\n\n  return {\n    process(input) {\n      const ciphertext = initDecryptor(input);\n      return decryptor ? decryptor.process(ciphertext) : new Uint8Array(0);\n    },\n\n    finalize(input = new Uint8Array(0)) {\n      const ciphertext = initDecryptor(input);\n      if (!decryptor) {\n        const salt = resolveOpenSslDecryptSaltWithoutHeader(options, operationOptions);\n        const { key, iv } = deriveKeyIv(registry, options, salt);\n        decryptor = registry.createCipher(toTransformOptions(options, key, iv, operationOptions)).createDecryptor();\n        const buffered = header;\n        header = new Uint8Array(0);\n        return decryptor.finalize(buffered);\n      }\n      return decryptor.finalize(ciphertext);\n    },\n  };\n}\n\nfunction createDerivedKeyAeadSealer(\n  registry: Registry,\n  options: CreateDerivedKeyAeadOptions,\n  operationOptions?: DerivedKeyAeadSealOperationOptions,\n): Transform {\n  const formatOptions = resolveFormatOptions(options.format);\n  const format = resolveFormat(registry, formatOptions);\n  const salt = resolveSalt(options, operationOptions);\n  const key = deriveAeadKey(registry, options, salt);\n  const sealer = registry.createAead(toAeadOptions(options, key)).createSealer(toAeadOperationOptions(operationOptions));\n\n  if (!format) {\n    return sealer;\n  }\n\n  if (!isStreamingOpenSslFormat(format)) {\n    return createBufferedAeadFormatSealer(format, salt, sealer);\n  }\n\n  let emittedHeader = false;\n  const emitHeader = (): Uint8Array => {\n    if (emittedHeader) {\n      return new Uint8Array(0);\n    }\n    emittedHeader = true;\n    return format.stringify({ ciphertext: new Uint8Array(0), salt });\n  };\n\n  return {\n    process(input) {\n      return concatBytes(emitHeader(), sealer.process(input));\n    },\n\n    finalize(input = new Uint8Array(0)) {\n      return concatBytes(emitHeader(), sealer.finalize(input));\n    },\n  };\n}\n\nfunction createDerivedKeyAeadOpener(\n  registry: Registry,\n  options: CreateDerivedKeyAeadOptions,\n  operationOptions?: DerivedKeyAeadOpenOperationOptions,\n): Transform {\n  const formatOptions = resolveFormatOptions(options.format);\n  const format = resolveFormat(registry, formatOptions);\n\n  if (!format) {\n    const salt = resolveSalt(options, operationOptions);\n    const key = deriveAeadKey(registry, options, salt);\n    return registry.createAead(toAeadOptions(options, key)).createOpener(toAeadOperationOptions(operationOptions));\n  }\n\n  if (!isStreamingOpenSslFormat(format)) {\n    return createBufferedAeadFormatOpener(registry, options, format, operationOptions);\n  }\n\n  let header = new Uint8Array(0);\n  let opener: Transform | undefined;\n\n  const initOpener = (input: Uint8Array): Uint8Array => {\n    if (opener) {\n      return input;\n    }\n\n    header = new Uint8Array(concatBytes(header, input));\n    if (header.length < 16) {\n      return new Uint8Array(0);\n    }\n\n    const parsed = format.parse(header.slice(0, 16));\n    const hasSalt = parsed.salt !== undefined;\n    const salt = hasSalt ? parsed.salt! : resolveOpenSslDecryptSaltWithoutHeader(options, operationOptions);\n    const ciphertext = hasSalt ? concatBytes(parsed.ciphertext, header.slice(16)) : header;\n    const key = deriveAeadKey(registry, options, salt);\n    opener = registry.createAead(toAeadOptions(options, key)).createOpener(toAeadOperationOptions(operationOptions));\n    header = new Uint8Array(0);\n    return ciphertext;\n  };\n\n  return {\n    process(input) {\n      const ciphertext = initOpener(input);\n      return opener ? opener.process(ciphertext) : new Uint8Array(0);\n    },\n\n    finalize(input = new Uint8Array(0)) {\n      const ciphertext = initOpener(input);\n      if (!opener) {\n        const salt = resolveOpenSslDecryptSaltWithoutHeader(options, operationOptions);\n        const key = deriveAeadKey(registry, options, salt);\n        opener = registry.createAead(toAeadOptions(options, key)).createOpener(toAeadOperationOptions(operationOptions));\n        const buffered = header;\n        header = new Uint8Array(0);\n        return opener.finalize(buffered);\n      }\n      return opener.finalize(ciphertext);\n    },\n  };\n}\n\nfunction createBufferedFormatEncryptor(\n  format: FormatComponent,\n  salt: Uint8Array | undefined,\n  encryptor: Transform,\n): Transform {\n  const chunks: Uint8Array[] = [];\n\n  return {\n    process(input) {\n      const output = encryptor.process(input);\n      if (output.length !== 0) {\n        chunks.push(output);\n      }\n      return new Uint8Array(0);\n    },\n\n    finalize(input = new Uint8Array(0)) {\n      const output = encryptor.finalize(input);\n      if (output.length !== 0) {\n        chunks.push(output);\n      }\n      return format.stringify({ ciphertext: concatBytes(...chunks), salt });\n    },\n  };\n}\n\nfunction createBufferedAeadFormatSealer(\n  format: FormatComponent,\n  salt: Uint8Array | undefined,\n  sealer: Transform,\n): Transform {\n  const chunks: Uint8Array[] = [];\n\n  return {\n    process(input) {\n      const output = sealer.process(input);\n      if (output.length !== 0) {\n        chunks.push(output);\n      }\n      return new Uint8Array(0);\n    },\n\n    finalize(input = new Uint8Array(0)) {\n      const output = sealer.finalize(input);\n      if (output.length !== 0) {\n        chunks.push(output);\n      }\n      return format.stringify({ ciphertext: concatBytes(...chunks), salt });\n    },\n  };\n}\n\nfunction createBufferedAeadFormatOpener(\n  registry: Registry,\n  options: CreateDerivedKeyAeadOptions,\n  format: FormatComponent,\n  operationOptions?: DerivedKeyAeadOpenOperationOptions,\n): Transform {\n  const chunks: Uint8Array[] = [];\n\n  return {\n    process(input) {\n      if (input.length !== 0) {\n        chunks.push(input);\n      }\n      return new Uint8Array(0);\n    },\n\n    finalize(input = new Uint8Array(0)) {\n      if (input.length !== 0) {\n        chunks.push(input);\n      }\n      const parsed = format.parse(concatBytes(...chunks));\n      const salt = parsed.salt ?? resolveSalt(options, operationOptions);\n      const key = deriveAeadKey(registry, options, salt);\n      return registry.createAead(toAeadOptions(options, key)).open(parsed.ciphertext, toAeadOperationOptions(operationOptions));\n    },\n  };\n}\n\nfunction createBufferedFormatDecryptor(\n  registry: Registry,\n  options: CreateDerivedKeyCipherOptions,\n  format: FormatComponent,\n  operationOptions?: DerivedKeyCipherOperationOptions,\n): Transform {\n  const chunks: Uint8Array[] = [];\n\n  return {\n    process(input) {\n      if (input.length !== 0) {\n        chunks.push(input);\n      }\n      return new Uint8Array(0);\n    },\n\n    finalize(input = new Uint8Array(0)) {\n      if (input.length !== 0) {\n        chunks.push(input);\n      }\n      const parsed = format.parse(concatBytes(...chunks));\n      const salt = parsed.salt ?? resolveSalt(options, operationOptions);\n      const { key, iv } = deriveKeyIv(registry, options, salt);\n      return registry.createCipher(toTransformOptions(options, key, iv, operationOptions)).decrypt(parsed.ciphertext);\n    },\n  };\n}\n\nfunction deriveAeadKey(\n  registry: Registry,\n  options: CreateDerivedKeyAeadOptions,\n  salt: Uint8Array | undefined,\n): Uint8Array {\n  const keySize = resolveAeadKeySize(registry, options);\n  if (options.kdf.length !== undefined && options.kdf.length !== keySize) {\n    throw new Error(`kdf.length (${options.kdf.length}) does not match derived material length (${keySize}).`);\n  }\n  return deriveForKey(registry, options, salt, keySize);\n}\n\nfunction deriveKeyIv(\n  registry: Registry,\n  options: CreateDerivedKeyCipherOptions,\n  salt: Uint8Array | undefined,\n): { key: Uint8Array; iv?: Uint8Array } {\n  const keySize = resolveKeySize(registry, options);\n  const ivSize = resolveIvSize(registry, options);\n  const length = keySize + ivSize;\n  if (options.kdf.length !== undefined && options.kdf.length !== length) {\n    throw new Error(`kdf.length (${options.kdf.length}) does not match derived material length (${length}).`);\n  }\n  const derived = deriveForKey(registry, options, salt, length);\n  return {\n    key: derived.slice(0, keySize),\n    iv: ivSize === 0 ? undefined : derived.slice(keySize, keySize + ivSize),\n  };\n}\n\nfunction deriveForKey(\n  registry: Registry,\n  options: CreateDerivedKeyCipherOptions | CreateDerivedKeyAeadOptions,\n  salt: Uint8Array | undefined,\n  length: number,\n): Uint8Array {\n  const name = options.kdf.name;\n  const { name: _name, length: _ignoredLength, salt: _ignoredSalt, ...kdfParams } = options.kdf;\n  return derive(registry, {\n    ...kdfParams,\n    name,\n    ...(salt !== undefined ? { salt } : {}),\n    length,\n  } as DeriveOptions);\n}\n\nfunction toAeadOptions(\n  options: CreateDerivedKeyAeadOptions,\n  key: Uint8Array,\n): CreateAeadOptions {\n  const {\n    kdf,\n    format,\n    keySize,\n    salt,\n    saltSize,\n    ...aeadOptions\n  } = options;\n  return {\n    ...aeadOptions,\n    key,\n  } as CreateAeadOptions;\n}\n\nfunction toTransformOptions(\n  options: CreateDerivedKeyCipherOptions,\n  key: Uint8Array,\n  iv: Uint8Array | undefined,\n  operationOptions?: DerivedKeyCipherOperationOptions,\n): CreateTransformOptions {\n  const {\n    kdf,\n    format,\n    keySize,\n    ivSize,\n    salt,\n    saltSize,\n    ...transformOptions\n  } = options;\n  const cipherOperation = operationOptions ? stripSalt(operationOptions) : undefined;\n  if (cipherOperation) {\n    assertNoReservedOperationOptions(cipherOperation);\n  }\n  return {\n    ...transformOptions,\n    ...cipherOperation,\n    key,\n    ...(iv ? { iv } : {}),\n  };\n}\n\nfunction stripSalt<T extends { salt?: unknown }>(operationOptions: T | undefined): Omit<T, 'salt'> | undefined {\n  if (!operationOptions) {\n    return undefined;\n  }\n  const { salt: _salt, ...cipherOperation } = operationOptions;\n  return cipherOperation;\n}\n\ntype CipherOperationWithoutSalt = Omit<DerivedKeyCipherOperationOptions, 'salt'>;\n\nfunction toAeadOperationOptions<T extends { salt?: unknown }>(operationOptions: T | undefined): Omit<T, 'salt'> | undefined {\n  const aeadOperation = stripSalt(operationOptions);\n  assertNoReservedOperationOptions(aeadOperation);\n  return aeadOperation;\n}\n\nfunction resolveSalt(\n  options: CreateDerivedKeyCipherOptions | CreateDerivedKeyAeadOptions,\n  operationOptions: { salt?: Uint8Array | string | null } | undefined,\n): Uint8Array | undefined {\n  const operationSalt = resolveOperationSalt(operationOptions);\n  if (operationSalt !== undefined) {\n    return operationSalt;\n  }\n\n  const creationSalt = resolveCreationSalt(options);\n  if (creationSalt !== undefined) {\n    return creationSalt;\n  }\n\n  return undefined;\n}\n\nfunction resolveOpenSslDecryptSaltWithoutHeader(\n  options: CreateDerivedKeyCipherOptions | CreateDerivedKeyAeadOptions,\n  operationOptions: { salt?: Uint8Array | string | null } | undefined,\n): Uint8Array | undefined {\n  const operationSalt = resolveOperationSalt(operationOptions);\n  if (operationSalt !== undefined) {\n    return operationSalt;\n  }\n\n  const creationSalt = resolveCreationSalt(options);\n  if (creationSalt !== undefined) {\n    return creationSalt;\n  }\n\n  return new Uint8Array(0);\n}\n\nfunction resolveOperationSalt(\n  operationOptions: { salt?: Uint8Array | string | null } | undefined,\n): Uint8Array | undefined {\n  if (!operationOptions || !Object.prototype.hasOwnProperty.call(operationOptions, 'salt')) {\n    return undefined;\n  }\n  return normalizeSalt(operationOptions.salt, 'salt');\n}\n\nfunction resolveCreationSalt(options: CreateDerivedKeyCipherOptions | CreateDerivedKeyAeadOptions): Uint8Array | undefined {\n  if (!Object.prototype.hasOwnProperty.call(options.kdf, 'salt')) {\n    return undefined;\n  }\n  return normalizeSalt(options.kdf.salt as Uint8Array | string | null | undefined, 'kdf.salt');\n}\n\nfunction normalizeSalt(\n  salt: Uint8Array | string | null | undefined,\n  label = 'salt',\n): Uint8Array {\n  if (salt === undefined || salt === null) {\n    return new Uint8Array(0);\n  }\n  if (typeof salt === 'string') {\n    return new TextEncoder().encode(salt);\n  }\n  if (salt instanceof Uint8Array) {\n    return salt.slice();\n  }\n  throw new TypeError(`${label} must be a Uint8Array or string.`);\n}\n\nfunction assertDerivedKeyOptions(\n  options: CreateDerivedKeyCipherOptions | CreateDerivedKeyAeadOptions,\n  label = 'createDerivedKeyCipher',\n): void {\n  if (!options.kdf || typeof options.kdf !== 'object' || Array.isArray(options.kdf)) {\n    throw new TypeError(`${label} requires kdf to be an object with name and input.`);\n  }\n  if (typeof options.kdf.name !== 'string' || options.kdf.name.length === 0) {\n    throw new TypeError(`${label} requires kdf.name.`);\n  }\n  if (options.kdf.input === undefined || options.kdf.input === null) {\n    throw new TypeError(`KDF ${options.kdf.name} requires input.`);\n  }\n}\n\nfunction resolveAeadKeySize(registry: Registry, options: CreateDerivedKeyAeadOptions): number {\n  if (options.keySize !== undefined) {\n    assertPositiveInteger(options.keySize, 'keySize');\n    return options.keySize;\n  }\n\n  const aead = registry.get<'aead', AeadComponent>('aead', options.algorithm);\n  if (!aead.keySizes || aead.keySizes.length === 0) {\n    throw new Error(`${options.algorithm} derived-key AEAD requires keySize.`);\n  }\n  return Math.max(...aead.keySizes);\n}\n\nfunction resolveKeySize(registry: Registry, options: CreateDerivedKeyCipherOptions): number {\n  if (options.keySize !== undefined) {\n    assertPositiveInteger(options.keySize, 'keySize');\n    return options.keySize;\n  }\n\n  const cipher = registry.get<'cipher', CipherComponent>('cipher', options.cipher);\n  if (!cipher.keySizes || cipher.keySizes.length === 0) {\n    throw new Error(`${options.cipher} derived-key cipher requires keySize.`);\n  }\n  return Math.max(...cipher.keySizes);\n}\n\nfunction resolveIvSize(registry: Registry, options: CreateDerivedKeyCipherOptions): number {\n  const cipher = registry.get<'cipher', CipherComponent>('cipher', options.cipher);\n  if (cipher.type !== 'block') {\n    return 0;\n  }\n  if (!options.mode) {\n    return 0;\n  }\n\n  const mode = registry.get<'mode', ModeComponent>('mode', options.mode);\n  return mode.getIvSize?.(cipher as BlockCipherComponent) ?? 0;\n}\n\nfunction resolveFormatOptions(\n  format: CreateDerivedKeyCipherOptions['format'],\n): (FormatOptions & { saltSize?: number }) | undefined {\n  if (!format) {\n    return undefined;\n  }\n  return typeof format === 'string' ? { name: format } : format;\n}\n\nfunction resolveFormat(\n  registry: Registry,\n  formatOptions: (FormatOptions & { saltSize?: number }) | undefined,\n): FormatComponent | undefined {\n  if (!formatOptions) {\n    return undefined;\n  }\n  return registry.get<'format', FormatComponent>('format', formatOptions.name);\n}\n\nfunction isStreamingOpenSslFormat(format: FormatComponent): boolean {\n  return format.name === 'OpenSSL';\n}\n\nfunction assertPositiveInteger(value: number, label: string): void {\n  if (!Number.isInteger(value) || value <= 0) {\n    throw new RangeError(`${label} must be a positive integer.`);\n  }\n}\n\ndeclare const TextEncoder: {\n  new(): { encode(input: string): Uint8Array };\n};\n","import type {\n  AeadComponent,\n  AeadTransform,\n  BlockCipher,\n  BlockCipherComponent,\n  CipherComponent,\n  Transform,\n} from './component.js';\nimport type { Registry } from './registry.js';\n\nexport interface CreateAeadOptions {\n  algorithm: string;\n  key: Uint8Array;\n  [option: string]: unknown;\n}\n\nexport interface AeadSealOperationOptions {\n  nonce?: Uint8Array;\n  aad?: Uint8Array;\n  tagLength?: number;\n  [option: string]: unknown;\n}\n\nexport interface AeadOpenOperationOptions {\n  nonce?: Uint8Array;\n  aad?: Uint8Array;\n  tag?: Uint8Array;\n  tagLength?: number;\n  [option: string]: unknown;\n}\n\nexport interface AeadFacade {\n  seal(plaintext: Uint8Array, options?: AeadSealOperationOptions): Uint8Array;\n  open(ciphertext: Uint8Array, options?: AeadOpenOperationOptions): Uint8Array;\n  createSealer(options?: AeadSealOperationOptions): Transform;\n  createOpener(options?: AeadOpenOperationOptions): Transform;\n}\n\n/**\n * AEAD operation options only reserve facade identity keys.\n * Unlike createCipher, cipher-pipeline keys such as `mode`, `padding`, `cipher`,\n * and `iv` are treated as unknown extras and ignored by core.\n */\nconst AEAD_RESERVED_OPERATION_OPTION_KEYS = ['algorithm', 'key'] as const;\n\nfunction assertNoAeadReservedOperationOptions(\n  options: Record<string, unknown>,\n): void {\n  for (const key of AEAD_RESERVED_OPERATION_OPTION_KEYS) {\n    if (Object.prototype.hasOwnProperty.call(options, key)) {\n      throw new Error(`operation options must not override reserved key: ${key}`);\n    }\n  }\n}\n\nfunction splitCreateAeadOptions(options: CreateAeadOptions): {\n  algorithm: string;\n  key: Uint8Array;\n  createOptions: Record<string, unknown>;\n} {\n  const { algorithm, key, ...createOptions } = options;\n  return { algorithm, key, createOptions };\n}\n\nfunction mergeAeadOptions(\n  createOptions: Record<string, unknown>,\n  operation?: Record<string, unknown>,\n): Record<string, unknown> {\n  if (!operation) {\n    return createOptions;\n  }\n  assertNoAeadReservedOperationOptions(operation);\n  return { ...createOptions, ...operation };\n}\n\nexport function createAead(registry: Registry, options: CreateAeadOptions): AeadFacade {\n  const { algorithm, key, createOptions } = splitCreateAeadOptions(options);\n  const component = registry.get<'aead', AeadComponent>('aead', algorithm);\n  // create() once: AeadTransform must be reusable and create fresh per-operation transforms.\n  const transform: AeadTransform = component.create({ key, options: createOptions }, {\n    createEncryptor(transformOptions) {\n      return registry.createEncryptor(transformOptions);\n    },\n    createDecryptor(transformOptions) {\n      return registry.createDecryptor(transformOptions);\n    },\n    createBlockCipher({ cipher, key: blockKey }): BlockCipher {\n      const cipherComponent = registry.get<'cipher', CipherComponent>('cipher', cipher);\n      if (cipherComponent.type !== 'block') {\n        throw new Error(`Expected a block cipher component: ${cipher}`);\n      }\n      return (cipherComponent as BlockCipherComponent).create(blockKey);\n    },\n  });\n\n  function createSealer(operationOptions?: AeadSealOperationOptions): Transform {\n    const merged = mergeAeadOptions(createOptions, operationOptions);\n    return transform.createSealer({\n      nonce: merged.nonce as Uint8Array | undefined,\n      aad: merged.aad as Uint8Array | undefined,\n      tagLength: merged.tagLength as number | undefined,\n      options: merged,\n    });\n  }\n\n  function createOpener(operationOptions?: AeadOpenOperationOptions): Transform {\n    const merged = mergeAeadOptions(createOptions, operationOptions);\n    return transform.createOpener({\n      nonce: merged.nonce as Uint8Array | undefined,\n      aad: merged.aad as Uint8Array | undefined,\n      tag: merged.tag as Uint8Array | undefined,\n      tagLength: merged.tagLength as number | undefined,\n      options: merged,\n    });\n  }\n\n  return {\n    seal(plaintext, operationOptions) {\n      return createSealer(operationOptions).finalize(plaintext);\n    },\n\n    open(ciphertext, operationOptions) {\n      return createOpener(operationOptions).finalize(ciphertext);\n    },\n\n    createSealer,\n    createOpener,\n  };\n}\n","import type { BlockCipherComponent, CipherComponent, ModeComponent, PaddingComponent, Transform } from './component.js';\nimport type { Registry } from './registry.js';\nimport { concatBytes } from './bytes.js';\n\nexport interface CreateTransformOptions {\n  cipher: string;\n  mode?: string;\n  padding?: string;\n  key: Uint8Array;\n  iv?: Uint8Array;\n  /**\n   * Allows modes to reuse or mutate input buffers when they can do so safely.\n   * This is an optimization hint; modes may ignore it.\n  */\n  mutableInput?: boolean;\n  [option: string]: unknown;\n}\n\nexport function createEncryptor(registry: Registry, options: CreateTransformOptions): Transform {\n  const cipher = registry.get<'cipher', CipherComponent>('cipher', options.cipher);\n  if (cipher.type === 'stream') {\n    return createStreamEncryptor(cipher.createEncryptor({\n      key: options.key,\n      options,\n    }));\n  }\n\n  const { mode, padding } = resolveBlockOptions(registry, options);\n  const blockCipher = cipher.create(options.key);\n\n  const modeEncryptor = mode.createEncryptor({\n    cipher: blockCipher,\n    iv: options.iv,\n    options,\n  });\n\n  if (mode.requiresPadding === false) {\n    return createStreamEncryptor(modeEncryptor);\n  }\n  const blockPadding = padding as PaddingComponent;\n\n  let finalized = false;\n  let pending: Uint8Array = new Uint8Array(0);\n\n  return {\n    process(input) {\n      assertNotFinalized(finalized);\n      const data = concatBytes(pending, input);\n      const processLength = data.length - (data.length % blockCipher.blockSize);\n      pending = data.slice(processLength);\n      return processLength === 0 ? new Uint8Array(0) : modeEncryptor.process(data.subarray(0, processLength));\n    },\n\n    finalize(input = new Uint8Array(0)) {\n      assertNotFinalized(finalized);\n      const processed = input.length === 0 ? new Uint8Array(0) : this.process(input);\n      finalized = true;\n      const finalBlock = blockPadding.pad(pending, blockCipher.blockSize);\n      pending = new Uint8Array(0);\n      return concatBytes(processed, modeEncryptor.finalize(finalBlock));\n    },\n  };\n}\n\nexport function createDecryptor(registry: Registry, options: CreateTransformOptions): Transform {\n  const cipher = registry.get<'cipher', CipherComponent>('cipher', options.cipher);\n  if (cipher.type === 'stream') {\n    return createStreamDecryptor(cipher.createDecryptor({\n      key: options.key,\n      options,\n    }));\n  }\n\n  const { mode, padding } = resolveBlockOptions(registry, options);\n  const blockCipher = cipher.create(options.key);\n\n  const modeDecryptor = mode.createDecryptor({\n    cipher: blockCipher,\n    iv: options.iv,\n    options,\n  });\n\n  if (mode.requiresPadding === false) {\n    return createStreamDecryptor(modeDecryptor);\n  }\n  const blockPadding = padding as PaddingComponent;\n\n  let finalized = false;\n  let pending: Uint8Array = new Uint8Array(0);\n  let plaintextPending: Uint8Array = new Uint8Array(0);\n\n  return {\n    process(input) {\n      assertNotFinalized(finalized);\n      const data = concatBytes(pending, input);\n      const processLength = data.length - (data.length % blockCipher.blockSize);\n      pending = data.slice(processLength);\n\n      if (processLength === 0) {\n        return new Uint8Array(0);\n      }\n\n      const decrypted = modeDecryptor.process(data.subarray(0, processLength));\n      const output = plaintextPending;\n      plaintextPending = decrypted;\n      return output;\n    },\n\n    finalize(input = new Uint8Array(0)) {\n      assertNotFinalized(finalized);\n      const processed = input.length === 0 ? new Uint8Array(0) : this.process(input);\n      finalized = true;\n      if (pending.length !== 0) {\n        blockPadding.unpad(pending, blockCipher.blockSize);\n      }\n      const finalPlaintext = blockPadding.unpad(plaintextPending, blockCipher.blockSize);\n      pending = new Uint8Array(0);\n      plaintextPending = new Uint8Array(0);\n      return concatBytes(processed, finalPlaintext, modeDecryptor.finalize());\n    },\n  };\n}\n\nfunction createStreamEncryptor(modeEncryptor: Transform): Transform {\n  let finalized = false;\n\n  return {\n    process(input) {\n      assertNotFinalized(finalized);\n      return modeEncryptor.process(input);\n    },\n\n    finalize(input = new Uint8Array(0)) {\n      assertNotFinalized(finalized);\n      finalized = true;\n      return concatBytes(\n        input.length === 0 ? new Uint8Array(0) : modeEncryptor.process(input),\n        modeEncryptor.finalize(),\n      );\n    },\n  };\n}\n\nfunction createStreamDecryptor(modeDecryptor: Transform): Transform {\n  let finalized = false;\n\n  return {\n    process(input) {\n      assertNotFinalized(finalized);\n      return modeDecryptor.process(input);\n    },\n\n    finalize(input = new Uint8Array(0)) {\n      assertNotFinalized(finalized);\n      finalized = true;\n      return concatBytes(\n        input.length === 0 ? new Uint8Array(0) : modeDecryptor.process(input),\n        modeDecryptor.finalize(),\n      );\n    },\n  };\n}\n\nfunction resolveBlockOptions(registry: Registry, options: CreateTransformOptions): {\n  cipher: BlockCipherComponent;\n  mode: ModeComponent;\n  padding?: PaddingComponent;\n} {\n  if (!options.mode) {\n    throw new Error(`${options.cipher} block cipher requires a mode.`);\n  }\n\n  const mode = registry.get<'mode', ModeComponent>('mode', options.mode);\n  let padding: PaddingComponent | undefined;\n  if (mode.requiresPadding !== false) {\n    if (!options.padding) {\n      throw new Error(`${options.cipher} block cipher requires padding.`);\n    }\n    padding = registry.get<'padding', PaddingComponent>('padding', options.padding);\n  }\n\n  return {\n    cipher: registry.get<'cipher', BlockCipherComponent>('cipher', options.cipher),\n    mode,\n    padding,\n  };\n}\n\nfunction assertNotFinalized(finalized: boolean): void {\n  if (finalized) {\n    throw new Error('Transform is already finalized.');\n  }\n}\n","import type { AnyComponent, Component, ComponentKind, HashComponent, PresetComponent } from './component.js';\nimport { DuplicateComponentError, MissingComponentError } from './errors.js';\nimport type {\n  CreateDerivedKeyAeadOptions,\n  CreateDerivedKeyCipherOptions,\n  DeriveOptions,\n  DerivedKeyAeadFacade,\n  DerivedKeyCipherFacade,\n} from './derived-key.js';\nimport { createDerivedKeyAead, createDerivedKeyCipher, derive } from './derived-key.js';\nimport type {\n  AeadFacade,\n  CreateAeadOptions,\n} from './aead.js';\nimport { createAead } from './aead.js';\nimport type { CipherOperationOptions } from './operation-options.js';\nimport { assertNoReservedOperationOptions } from './operation-options.js';\nimport type { CreateTransformOptions } from './transform.js';\nimport { createDecryptor, createEncryptor } from './transform.js';\nimport type { Transform } from './component.js';\n\nfunction mergeTransformOptions(\n  base: CreateTransformOptions,\n  operation?: CipherOperationOptions,\n): CreateTransformOptions {\n  if (!operation) {\n    return base;\n  }\n  assertNoReservedOperationOptions(operation);\n  return { ...base, ...operation };\n}\n\nexport interface Registry {\n  use(component: AnyComponent): Registry;\n  useHash(hash: HashComponent): Registry;\n  getHash(name: string): HashComponent;\n  has(kind: ComponentKind, name: string): boolean;\n  get<Kind extends ComponentKind, T extends Component<Kind>>(kind: Kind, name: string): T;\n  list(kind?: ComponentKind): AnyComponent[];\n  createCipher(options: CreateTransformOptions): CipherFacade;\n  createAead(options: CreateAeadOptions): AeadFacade;\n  derive(options: DeriveOptions): Uint8Array;\n  createDerivedKeyCipher(options: CreateDerivedKeyCipherOptions): DerivedKeyCipherFacade;\n  createDerivedKeyAead(options: CreateDerivedKeyAeadOptions): DerivedKeyAeadFacade;\n  encrypt(options: CreateTransformOptions & { plaintext: Uint8Array }): Uint8Array;\n  decrypt(options: CreateTransformOptions & { ciphertext: Uint8Array }): Uint8Array;\n  createEncryptor(options: CreateTransformOptions): Transform;\n  createDecryptor(options: CreateTransformOptions): Transform;\n}\n\nexport interface CipherFacade {\n  encrypt(plaintext: Uint8Array, options?: CipherOperationOptions): Uint8Array;\n  decrypt(ciphertext: Uint8Array, options?: CipherOperationOptions): Uint8Array;\n  createEncryptor(options?: CipherOperationOptions): Transform;\n  createDecryptor(options?: CipherOperationOptions): Transform;\n}\n\nexport function createRegistry(components: Iterable<AnyComponent> = []): Registry {\n  const entries = new Map<string, AnyComponent>();\n\n  const normalizeName = (kind: ComponentKind, name: string) => (\n    kind === 'hash' ? name.replace(/-/g, '').toUpperCase() : name\n  );\n  const key = (kind: ComponentKind, name: string) => `${kind}:${normalizeName(kind, name)}`;\n\n  const registry: Registry = {\n    use(component) {\n      if (component.kind === 'preset') {\n        for (const item of (component as PresetComponent).components()) {\n          registry.use(item);\n        }\n        return registry;\n      }\n\n      const entryKey = key(component.kind, component.name);\n      if (entries.has(entryKey)) {\n        throw new DuplicateComponentError(component.kind, component.name);\n      }\n      entries.set(entryKey, component);\n      return registry;\n    },\n\n    useHash(hash) {\n      return registry.use(hash);\n    },\n\n    getHash(name) {\n      const component = entries.get(key('hash', name));\n      if (!component) {\n        throw new Error(`Hash not registered: ${normalizeName('hash', name)}.`);\n      }\n      return component as HashComponent;\n    },\n\n    has(kind, name) {\n      return entries.has(key(kind, name));\n    },\n\n    get(kind, name) {\n      const component = entries.get(key(kind, name));\n      if (!component) {\n        throw new MissingComponentError(kind, name);\n      }\n      return component as never;\n    },\n\n    list(kind) {\n      const components = [...entries.values()];\n      return kind ? components.filter((component) => component.kind === kind) : components;\n    },\n\n    createCipher(options) {\n      return {\n        encrypt(plaintext, operationOptions) {\n          return createEncryptor(registry, mergeTransformOptions(options, operationOptions)).finalize(plaintext);\n        },\n\n        decrypt(ciphertext, operationOptions) {\n          return createDecryptor(registry, mergeTransformOptions(options, operationOptions)).finalize(ciphertext);\n        },\n\n        createEncryptor(operationOptions) {\n          return createEncryptor(registry, mergeTransformOptions(options, operationOptions));\n        },\n\n        createDecryptor(operationOptions) {\n          return createDecryptor(registry, mergeTransformOptions(options, operationOptions));\n        },\n      };\n    },\n\n    createAead(options) {\n      return createAead(registry, options);\n    },\n\n    derive(options) {\n      return derive(registry, options);\n    },\n\n    createDerivedKeyCipher(options) {\n      return createDerivedKeyCipher(registry, options);\n    },\n\n    createDerivedKeyAead(options) {\n      return createDerivedKeyAead(registry, options);\n    },\n\n    encrypt(options) {\n      return createEncryptor(registry, options).finalize(options.plaintext);\n    },\n\n    decrypt(options) {\n      return createDecryptor(registry, options).finalize(options.ciphertext);\n    },\n\n    createEncryptor(options) {\n      return createEncryptor(registry, options);\n    },\n\n    createDecryptor(options) {\n      return createDecryptor(registry, options);\n    },\n  };\n\n  for (const component of components) {\n    registry.use(component);\n  }\n\n  return registry;\n}\n","const MAX_RANDOM_CHUNK = 65536;\n\nexport function randomBytes(length: number): Uint8Array {\n  assertNonNegativeInteger(length, 'length');\n  const bytes = new Uint8Array(length);\n  if (bytes.length === 0) {\n    return bytes;\n  }\n\n  const crypto = globalThis as typeof globalThis & {\n    crypto?: {\n      getRandomValues<T extends Uint8Array>(array: T): T;\n    };\n  };\n\n  if (crypto.crypto?.getRandomValues) {\n    const getRandomValues = crypto.crypto.getRandomValues.bind(crypto.crypto);\n    for (let offset = 0; offset < bytes.length; offset += MAX_RANDOM_CHUNK) {\n      getRandomValues(bytes.subarray(offset, Math.min(offset + MAX_RANDOM_CHUNK, bytes.length)));\n    }\n    return bytes;\n  }\n\n  for (let i = 0; i < bytes.length; i++) {\n    bytes[i] = Math.floor(Math.random() * 256);\n  }\n  return bytes;\n}\n\nfunction assertNonNegativeInteger(value: number, label: string): void {\n  if (!Number.isInteger(value) || value < 0) {\n    throw new RangeError(`${label} must be a non-negative integer.`);\n  }\n}\n","export interface BlockSizeOptions {\n  readonly max?: number;\n}\n\nexport function assertBlockSize(blockSize: number, options: BlockSizeOptions = {}): void {\n  const { max } = options;\n  if (!Number.isInteger(blockSize) || blockSize <= 0) {\n    throw new RangeError('blockSize must be a positive integer.');\n  }\n  if (max !== undefined && blockSize > max) {\n    throw new RangeError(`blockSize must be an integer between 1 and ${max}.`);\n  }\n}\n\nexport function assertBlockMultiple(input: Uint8Array, blockSize: number, label: string): void {\n  assertBlockSize(blockSize);\n  if (input.length % blockSize !== 0) {\n    throw new Error(`${label} input length must be a multiple of the block size.`);\n  }\n}\n\nexport function assertPaddedInput(input: Uint8Array, blockSize: number, label: string, options: BlockSizeOptions = {}): void {\n  assertBlockSize(blockSize, options);\n  if (input.length === 0 || input.length % blockSize !== 0) {\n    throw new Error(`Invalid ${label} padded data.`);\n  }\n}\n\nexport function assertIv(blockSize: number, iv: Uint8Array | undefined, modeName: string): asserts iv is Uint8Array {\n  if (!iv) {\n    throw new Error(`${modeName} mode requires an IV.`);\n  }\n  if (iv.length !== blockSize) {\n    throw new Error(`${modeName} IV length must match the cipher block size.`);\n  }\n}\n\nexport function getBlockPaddingLength(inputLength: number, blockSize: number): number {\n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