UNPKG

strong-cryptor

Version:
21 lines (20 loc) 981 B
import { Encoding, IIvAndEncryptedData } from './typings'; /** * separate the ivString with the encrypted data string * @param encryptedData encrypted data that will be separated * @param encoding the encoding that used in the encryption process * @returns object that contains the ivString and encrypted data string */ export declare function getIvAndEncryptedDataOnly(encryptedData: string, encoding: Encoding): IIvAndEncryptedData; /** * remove padding( `=` | equals sign) for string that encoded with base64 * @param encodedString base64 string that the padding will be removed * @returns base64 string that the padding already removed */ export declare function removeBase64Padding(encodedString: string): string; /** * generate random 256bits(32 characters) key * @returns return a 32 characters string */ export declare function genKey(): string; export declare function getDeprecateMessage(functionName: string, oldVersion: string, newVersion: string): string;