/** * A `Uint8Array` that WebCrypto will accept. * * Since TypeScript 5.7 `Uint8Array` is generic over its backing buffer, and the * default `Uint8Array` includes `SharedArrayBuffer`, which * `BufferSource` excludes. Everything this package allocates is already * `ArrayBuffer`-backed; the friction is only at the boundary, where a caller's * array arrives under the wider type. */ export type Bytes = Uint8Array; /** * Narrows without copying in the ordinary case. * * A view over a `SharedArrayBuffer` is copied out, because WebCrypto rejects * those outright — better a copy than a `TypeError` from inside `subtle`. */ export declare function asBytes(view: Uint8Array): Bytes; /** Bytes from whatever the caller had to hand. */ export declare function toBytes(data: Uint8Array | ArrayBuffer | Blob): Promise; //# sourceMappingURL=bytes.d.ts.map