Usage:

<script src="encriptor.js"></script>

Once you have included the EncriptorJS library in your project, you can start encrypting and decrypting text.

Encrypting Text
To encrypt text, use the encrypt method of the Encriptor object. Here's an example:

const text = 'My name is Sh';
const key = '1234';

const encryptedText = Encriptor.encrypt(text, key);
console.log(encryptedText); // Outputs: 'Kcdew9zdYidBf'
The encrypt method takes two parameters: the text you want to encrypt and an optional key for additional security. It is recommended to use only digits in the key parameter. It returns the encrypted text.

Decrypting Text
To decrypt the encrypted text, use the decrypt method of the Encriptor object. Here's an example:

const encryptedText = 'Kcdew9zdYidBf'; // Replace with the encrypted text
const key = '1234';
const decryptedText = Encriptor.decrypt(encryptedText, key);
console.log(decryptedText); // Outputs: 'My name is Sh'
The decrypt method takes two parameters: the encryptedText you want to decrypt and the key used during encryption. It returns the decrypted text.

Shuffling Strings
The EncriptorJS library also provides a utility function called shuffleString that can be used to shuffle strings using a key. Here's how you can use it:

const text = 'Hello, World!';
const shuffledText = Encriptor.shuffleString(text, 42);
console.log(shuffledText); // Outputs a shuffled version of the input string
The shuffleString function takes a text parameter as the input string and an optional key parameter used to initialize the random number generator. By using the same key, you can obtain the same shuffled result. This function can be used for encryption purposes or to shuffle strings for other applications.

Please note that the shuffleString function alone does not provide strong encryption. For secure encryption, it is recommended to use well-established encryption algorithms and libraries designed for that purpose.

Encriptor.shuffle(text) always gives different shuffled pattern.
