declare module "react-native-simple-crypto" { interface PublicKey { public: string; } interface KeyPair extends PublicKey { private: string; } export namespace AES { export function encrypt( text: ArrayBuffer, key: ArrayBuffer, iv: ArrayBuffer ): Promise; export function decrypt( ciphertext: ArrayBuffer, key: ArrayBuffer, iv: ArrayBuffer ): Promise; } export namespace SHA { export function sha1(text: string): Promise; export function sha1(text: ArrayBuffer): Promise; export function sha256(text: string): Promise; export function sha256(text: ArrayBuffer): Promise; export function sha512(text: string): Promise; export function sha512(text: ArrayBuffer): Promise; } export namespace HMAC { export function hmac256( ciphertext: ArrayBuffer, key: ArrayBuffer ): Promise; } export namespace PBKDF2 { export function hash( password: string | ArrayBuffer, salt: string | ArrayBuffer, iterations: number, keyLen: number, algorithm: "SHA1" | "SHA224" | "SHA256" | "SHA384" | "SHA512" ): Promise; } export namespace RSA { export function generateKeys(keySize: number): Promise; export function encrypt(data: string, key: string): Promise; export function decrypt(data: string, key: string): Promise; export function encrypt64(data: string, key: string): Promise; export function decrypt64(data: string, key: string): Promise; export function sign( data: string, key: string, hash: "Raw" | "SHA1" | "SHA224" | "SHA256" | "SHA384" | "SHA512" ): Promise; export function verify( data: string, secretToVerify: string, key: string, hash: "Raw" | "SHA1" | "SHA224" | "SHA256" | "SHA384" | "SHA512" ): Promise; } export namespace utils { export function randomBytes(bytes: number): Promise; export function convertArrayBufferToUtf8(input: ArrayBuffer): string; export function convertUtf8ToArrayBuffer(input: string): ArrayBuffer; export function convertArrayBufferToBase64(input: ArrayBuffer): string; export function convertBase64ToArrayBuffer(input: string): ArrayBuffer; export function convertArrayBufferToHex(input: ArrayBuffer): string; export function convertHexToArrayBuffer(input: string): ArrayBuffer; } }