/** * Wrapper class for the build in Crypto. */ export declare class PrivmxCrypto { private static cryptoApi; private static getCryptoApi; /** * Decrypts given data using the provided key. * @param {Uint8Array} data - data to decrypt * @param {string} key - key to use for decryption * @returns {Promise} decrypted data */ static decryptDataSymmetric(data: Uint8Array, key: Uint8Array): Promise; /** * Encrypts given data using the provided key. * @param {Uint8Array} data - data to encrypt * @param {string} key - key to use for encryption * @returns {Promise} encrypted data */ static encryptDataSymmetric(data: Uint8Array, key: Uint8Array): Promise; /** * Converts a PEM key to WIF format. * @param {string} keyPEM - PEM key to convert * @returns {Promise} WIF formatted key */ static convertPEMKeyToWIFKey(keyPEM: string): Promise; /** * Generates a new private key. * @param {string} [baseString] - optional base string to use for key generation * @returns {Promise} generated private key */ static generatePrivateKey(baseString?: string): Promise; /** * Generates a new public key from given private key. * @param {string} privKey - private key to use for generating the public key * @returns {Promise} generated public key */ static derivePublicKey(privKey: string): Promise; /** * Signs given data using the provided private key. * @param {Uint8Array} data - data to sign * @param {string} privKey - private key to use for signing * @returns {Promise} signature */ static signData(data: Uint8Array, privKey: string): Promise; /** * Generates a new private key using PBKDF2. * @param {string} salt - salt to use for key generation * @param {string} password - password to use for key generation * @returns {Promise} generated private key */ static derivePrivateKey(salt: string, password: string): Promise; /** * Derives a symmetric key from a password and salt using a key derivation function. * * @param {string} password - input password used to derive the key * @param {string} salt - a unique string used to ensure that the same password generates different keys * * @returns {Promise} generated derived key * */ static deriveKeySymmetric(password: string, salt: string): Promise; /** * Generates a new symmetric key signData a `Uint8Array`. * This function uses a cryptographic algorithm to create a secure random key. * * @returns {Promise} generated symmetric key * */ static generateKeySymmetric(): Promise; /** * Validate a signature of data using given key. * * @param data buffer * @param signature tof data * @param publicKey public ECC key in BASE58DER format used to validate data * @return validated data */ static verifySignature(data: Uint8Array, signature: Uint8Array, publicKey: string): Promise; }