@chatereum/react-e2ee
Version:
A End-to-end encryption library for React and browser based JavaScript frameworks
29 lines (28 loc) • 1.15 kB
TypeScript
import { type TDecryptForPlaintextHandler, type TDecryptHandler, type TEncryptHandler, type TEncryptPlaintextHandler } from './types';
/**
* @deprecated This method will be removed in future releases. Use 'encryptPlaintext' instead
* @param public_key The public key
* @param plainText The plain text string to encrypt
* @returns The encrypted text payload
*/
declare const encrypt: TEncryptHandler;
/**
* @param payload The payload containing public key and plain text string
* @returns The encrypted text
*/
declare const encryptPlaintext: TEncryptPlaintextHandler;
/**
* @deprecated This method will be removed in future releases. Use 'decryptPlaintext' instead
* @quickfix 'decryptPlaintext'
* @param aes_key The aes key
* @param iv The IV padding
* @param private_key The private key
* @param encrypted_text The encrypted text
* @returns The decrypted text
*/
declare const decrypt: TDecryptHandler;
/**
* @param payload The payload with required parameters to decrypt the encrypted text
*/
declare const decryptForPlaintext: TDecryptForPlaintextHandler;
export { encrypt, encryptPlaintext, decrypt, decryptForPlaintext };