Comparing version 1.3.3 to 1.4.0
{ | ||
"name": "keyhasher", | ||
"version": "1.3.3", | ||
"version": "1.4.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "encrypthashop.js", |
@@ -12,3 +12,3 @@ Simple, effective, easy to implement encryption for JavaScript | ||
```javascript | ||
const key = require('keyhasher'); | ||
const { encrypt, decrypt, hash } = require('keyhasher'); | ||
``` | ||
@@ -24,16 +24,16 @@ | ||
- use 'hash()' function with a Passcode number, and convert any sentence to encrypted format. | ||
- use 'revHash()' function with the same Passcode number, to get back the Real sentence. | ||
- use 'sha256()' function to finally hash the encrypted value | ||
- use 'encrypt()' function with a Passcode number, and convert any sentence to encrypted format. | ||
- use 'decrypt()' function with the same Passcode number, to get back the Real sentence. | ||
- use 'hash()' function to finally hash the encrypted value, and later compare | ||
```javascript | ||
const key = require('keyhasher'); | ||
const { encrypt, decrypt, hash } = require('keyhasher'); | ||
var hashAble = key.hash("Normal Sentence", process.env.passcode); // encryption | ||
var hashAble = encrypt("Normal Sentence", process.env.PASSCODE); // encryption | ||
console.log(`Hashed Phrase: ${hashAble}`) | ||
var rawWord = key.revHash("Hashed code", process.env.passcode); // decryption | ||
var rawWord = decrypt("Hashed code", process.env.PASSCODE); // decryption | ||
console.log(`Output: ${rawWord}`) | ||
const hashed = key.sha256(hashAble); // encryption + hashing | ||
const hashed = hash(hashAble); // encryption + hashing | ||
console.log(`Hashed: ${hashed}`) | ||
@@ -46,3 +46,3 @@ | ||
var hashAble = key.hash("Hi", 572); | ||
var hashAble = encrypt("Hi", 572); | ||
console.log(`Hashed Phrase: ${hashAble}`) | ||
@@ -52,3 +52,3 @@ | ||
var rawWord = key.revHash("X4A=", 572); | ||
var rawWord = decrypt("X4A=", 572); | ||
console.log(`Output: ${rawWord}`) | ||
@@ -58,3 +58,3 @@ | ||
const hashed = key.sha256(hashAble); | ||
const hashed = hash(hashAble); | ||
console.log(`Hashed: ${hashed}`) | ||
@@ -61,0 +61,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
52917
7
636