xsalsa20-csprng
Version:
CSPRNG and crypto library powered by XSalsa20
24 lines • 667 B
text/typescript
//#region src/index.d.ts
declare global {
interface WindowOrWorkerGlobalScope {
readonly msCrypto: Crypto;
}
}
declare class XSalsa20CSPRNG {
private xsalsa;
constructor();
static of(nonce: Uint8Array, key: Uint8Array): XSalsa20CSPRNG;
randomInt32(): number;
randomUint32(): number;
uniformInt(exclusive_upper_bound: number): number;
}
declare class XSalsa20 {
private xsalsa;
private buffer;
constructor(nonce: Uint8Array, key: Uint8Array);
stream(length: number): Uint8Array;
update(input: Uint8Array, output?: Uint8Array): Uint8Array;
}
//#endregion
export { XSalsa20, XSalsa20CSPRNG as default };
//# sourceMappingURL=index.d.mts.map