ayiin 2.0.4 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,37 @@
1
+ declare class Crypt {
2
+ /**
3
+ * Performs Base encryption and decryption.
4
+ * @param {string | Buffer} input - The input data to be encrypted or decrypted.
5
+ * @param {string} key - The encryption/decryption key.
6
+ * @returns {Buffer} - The encrypted or decrypted data as a Buffer.
7
+ */
8
+ private baseCrypt;
9
+ /**
10
+ * Encrypts a plaintext message using the given key.
11
+ * @param {string} text - The plaintext message to be encrypted.
12
+ * @param {string} key - The encryption key.
13
+ * @returns {string} - The encrypted data in Hex format.
14
+ */
15
+ encrypt: (text: string, key: string, bufferEncoding?: BufferEncoding) => string;
16
+ /**
17
+ * Decrypts an encrypted message using the given key.
18
+ * @param {string} encrypted - The encrypted data in Hex format.
19
+ * @param {string} key - The decryption key.
20
+ * @returns {string} - The decrypted plaintext message.
21
+ */
22
+ decrypt: (encrypted: string, key: string, bufferEncoding?: BufferEncoding) => string;
23
+ /**
24
+ * Converts a Hex string to its corresponding ASCII representation.
25
+ * @param {string} hexString - The Hex string to be converted.
26
+ * @returns {string} - The ASCII representation of the Hex string.
27
+ */
28
+ hexToAscii: (hexString: string) => string;
29
+ /**
30
+ * Converts an ASCII string to its corresponding Hex representation.
31
+ * @param {string} asciiString - The ASCII string to be converted.
32
+ * @returns {string} - The Hex representation of the ASCII string.
33
+ */
34
+ asciiToHex: (asciiString: string) => string;
35
+ md5: (data: string, encoding: BufferEncoding) => string;
36
+ }
37
+ export default Crypt;