@hazae41/chacha20poly1305
Version:
ChaCha20Poly1305 adapter for WebAssembly and JS implementations
12 lines (9 loc) • 468 B
TypeScript
import { BytesOrCopiable, Copiable } from '../../libs/copiable/index.js';
declare abstract class Cipher implements Disposable {
constructor(..._: any[]);
static importOrThrow(bytes: BytesOrCopiable<32>): Cipher;
abstract [Symbol.dispose](): void;
abstract encryptOrThrow(message: BytesOrCopiable, nonce: BytesOrCopiable<12>): Copiable;
abstract decryptOrThrow(message: BytesOrCopiable, nonce: BytesOrCopiable<12>): Copiable;
}
export { Cipher };