/** * If you need encrypt/decrypt some binaries, you can uses this library * * Algorithm RSA implemented by Marcos Fuenmayor * * @param {Array} private_key - If you have a private key * put the two prime numbers to makes Private Key, example: [38501, 45541], * by default, the private key is null. the numbers of private key need to have size * of 16 bits or more * * @param {Number} public_key - If you have a public key * put the number of public key, example: 1753374041 (38501 * 45541) * , by default, the public key is null */ export declare class CryptoRSA { private_key: number[] | null; public_key: number | null; constructor(private_key?: number[] | null, public_key?: number | null); isPrime: (number: number) => boolean; /** * If you set the public key, you can encrypt some binaries * @param {ArrayBuffer} binaries - Binary object * @returns {Array} - Returns array of numbers encrypted, if you don't set the public key, returns [] */ encrypt(binaries: any): ArrayBufferLike; /** * If you set the private key, you can decrypt to binaries * @param {Array} numbers_encrypted - The array of numbers that was encrypted * @returns {ArrayBuffer} - the binaries decrypted, if you don't set the private key, * returns array buffer with the default length */ decrypt(arr: ArrayBuffer): ArrayBuffer; /** If you set the private key, the method calcs public key * @returns {Number} - public key, example: 33, default returns null */ getpublic_key(): number | null; /** * set param public keys to decrypt * @param {Number} public_key - public key value, example: 33 */ setpublic_key(public_key: number): void; }