UNPKG

iocane

Version:
9 lines (8 loc) 916 B
/// <reference types="node" /> import { DerivedKeyInfo, EncryptedComponents, EncryptedBinaryComponents } from "../types"; export declare function decryptCBC(encryptedComponents: EncryptedComponents | EncryptedBinaryComponents, keyDerivationInfo: DerivedKeyInfo): Promise<string | Buffer>; export declare function decryptGCM(encryptedComponents: EncryptedComponents | EncryptedBinaryComponents, keyDerivationInfo: DerivedKeyInfo): Promise<string | Buffer>; export declare function encryptCBC(content: string | Buffer, keyDerivationInfo: DerivedKeyInfo, iv: Buffer): Promise<EncryptedComponents | EncryptedBinaryComponents>; export declare function encryptGCM(content: string | Buffer, keyDerivationInfo: DerivedKeyInfo, iv: Buffer): Promise<EncryptedComponents | EncryptedBinaryComponents>; export declare function generateIV(): Promise<Buffer>; export declare function generateSalt(length: number): Promise<string>;