Quick Start

Good to know: With the new update, the algorithm has completely changed. Encrypted texts prior to version 2.0.0 cannot be used in versions later than 2.0.0. Install password-locking@1.3.3 to use old version.

Install the library

npm i password-locking

Make your first code

We are encrypting a text using the def1 algorithm in this code block. This algorithm type will be the only one used in all versions. The biggest feature of this algorithm is that you don't need to specify whether you want to encrypt a plain text or decrypt an encrypted text. The system automatically detects and responds accordingly. If you examine the examples, the code in the encrypt block Password 123456789 (-_-)(^-^) will encrypt the text for you, and if you look at the decoding block, it will convert the text we encrypted in the 'encrypt' block back to its original form. Remember that we use salting technique in encryption, so you will encounter a different text each time you encrypt a message

const pl = require("password-locking");

let encrypted  = pl.encryption.def1({
text:"Password 123456789 (-_-)(^-^)"
});

FAQ / SSS

Does it have only one algorithm ?

As of now, we only have the def1 algorithm, but new updates will introduce new algorithms. Additionally, the algorithm we are currently working on allows you to specify your own parameters and create a personalized encryption algorithm, enabling you to perform even more secure encryption.

Is it safe ?

As of now, I cannot give you a 100% guarantee, but this algorithm is more secure on short data. If the encrypted data is stored in a database for a long time and is detected by an attacker, it can be decrypted. Therefore, this algorithm is more suitable for short data such as one-time verification codes, texts or passwords that change every 5 minutes, for example.

Last updated