1.0.5 • Published 3 years ago

dh-encrypt v1.0.5

Weekly downloads
8
License
(MIT OR Apache-2....
Repository
github
Last release
3 years ago

Configure

Require and configure the module:

const dhEncrypt = require('dh-encrypt');
dhEncrypt.configure({
  algorithm: String, // Required
  password: String, // Required
  ivKey: String, // Required
  logger: Object // Optional logger reference for custom logging. Defaults to console.
});

Use

1) Encrypt a value:

    dhEncrypt.encrypt('string');

2) Decrypt a value:

    dhEncrypt.decrypt('encrypted string');

Example:

let encryptedText = dhEncrypt.encrypt('test');
console.log(dhEncrypt.decrypt(encryptedText));

Prints:

test
1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.0

7 years ago

0.0.1

9 years ago