strong-cryptor
Version:
Strong encryptor and decryptor nodejs
21 lines (20 loc) • 981 B
TypeScript
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;