tiny-essentials
Version:
Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.
20 lines • 952 B
text/typescript
/**
* Decrypts an encrypted string using one or more keys.
*
* If `tinyCrypto.key` is a single key, it will be used directly.
* If it's an array of keys, decryption will be applied iteratively in sequence (as if reversing layered encryption).
*
* @param {Object} tinyCrypto - The crypto configuration object.
* @param {string|string[]} tinyCrypto.key - A single decryption key or an array of keys to apply sequentially.
* @param {string} tinyCrypto.algorithm - The encryption algorithm (e.g., 'aes-256-cbc').
* @param {BufferEncoding} tinyCrypto.stringType - The encoding type used in the encrypted string (e.g., 'hex', 'base64').
* @param {string} text - The encrypted string to decrypt.
* @returns {string} The fully decrypted string.
* @deprecated
*/
export function decrypt(tinyCrypto: {
key: string | string[];
algorithm: string;
stringType: BufferEncoding;
}, text: string): string;
//# sourceMappingURL=decrypt.d.mts.map