1.0.0 • Published 3 years ago
hbnext-encrypt-decrypt v1.0.0
HB Encryption Module
Description
A simple module to encrypt and decrypt string.
Options
Name | Default | Description |
---|---|---|
encryptionKey | null | Encryption key |
How to use it
Installation
// First you have to get module and instantiate it
npm i hbnext-encrypt-decrypt
After installing module, add this to your code:
```javascript
const options = {
encryptionKey: 'haikel'
};
const encryption = require('hbnext-encrypt-decrypt')(options);
How to encrypt?
const text = "testmodule"
const resultencrypt = encryption.encrypt(text);
How to decrypt?
const resultdecrypt = encryption.decrypt(resultencrypt)
Contact
1.0.0
3 years ago