/** Lowercase hex encoder — local to /security (util has no bytesToHex export). */
export function bytesToHex(bytes: Uint8Array | ArrayBuffer): string {
  const arr = ArrayBuffer.isView(bytes) ? bytes : new Uint8Array(bytes as ArrayBufferLike)
  return Array.from(arr)
    .map((b) => b.toString(16).padStart(2, '0'))
    .join('')
}
