declare class Encryption { /** * this will generate random password, with lowercase, * uppercase, numbers and special characters */ static generateRandPassword(): string; /** * this will generate random key * @returns { string } random series of string */ static generateRandKey(): string; /** * this will generate a 6 digit random number * @returns { Number } 6 digit key number */ static generateRandNumber(): number; /** * Converts string of text to base64 string * @param { string } text - any text * @returns { string } Base64 string */ static btoa(text: string): string; /** * Converts base64 string into the original text * @param { string } text - base46 string * @returns { string } original text */ static atob(text: string): string; /** * Encrypt password texts * @async * @param { string } text - password text * @returns { Promise } encypted */ static hashText(text: string): Promise; /** * Check if a password maches to a hash or encrypted password * @async * @param { string } text - password text * @param { string } hash - exncrypted text * @returns { Promise } true if it match */ static verifyTextToHash(text: string, hash: string): Promise; /** * This will generate jwt token * @param { Object } data - object that will be encrypted into jwt * @param { Number } expiration - optional, this will custom set expiration of jwt * @returns { string } a JWT token */ static generateJWT(data: Type, expiration?: number): string; /** * This will return the original object from the jwt token * @async * @param { string } token - jwt token * @returns { Promise } the encrypted object */ static verifyJWT(token: string): Promise; } export default Encryption;