Comparing version 1.1.0 to 1.2.0
14
index.js
@@ -0,1 +1,3 @@ | ||
var {moreSalting} = require('./algos/somersault') | ||
const hash = function (string, pass) { | ||
@@ -5,2 +7,4 @@ const input = string; | ||
var extraSalt = moreSalting(salt); | ||
if(salt>26){ | ||
@@ -17,4 +21,4 @@ salt = salt%26; | ||
var outSign = parseInt(conV) + parseInt(salt) | ||
let EncryptText = String.fromCharCode(outSign); | ||
var saltSign = outSign - extraSalt; | ||
let EncryptText = String.fromCharCode(saltSign); | ||
output.push(EncryptText); | ||
@@ -33,2 +37,4 @@ } | ||
var saltRev = parseInt(pass); | ||
var extraSaltRev = moreSalting(saltRev); | ||
@@ -47,3 +53,4 @@ if(saltRev>26){ | ||
var revOutSign = parseInt(revConV) - parseInt(saltRev); // minuses the salt added while encryption | ||
let decryptText = String.fromCharCode(revOutSign); // converts the ascii to text | ||
var saltSign = revOutSign + extraSaltRev; | ||
let decryptText = String.fromCharCode(saltSign); // converts the ascii to text | ||
revOutput.push(decryptText) // pushes final output to an array | ||
@@ -56,3 +63,2 @@ } | ||
module.exports = {hash, revHash} | ||
@@ -59,0 +65,0 @@ |
{ | ||
"name": "keyhasher", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
3575
4
58