0.4.5 • Published 3 years ago
@pf222jd/pntscrypt v0.4.5
Pntscrypt
node.js module for encryption, decryption and hashing of strings.
Usage
import { Pntscrypt } from "Pntscrypt.js";
const SECRET_STRING = "mysecret1337"
const encryption = new Pntscrypt(SECRET_STRING)
const encryptedString = encryption.encryptUsingSubstitution()
console.log(encryptedString);
> 2d8tr7t9giim
const decryption = new Pntscrypt(encryptedString)
const decryptedString = decryption.decryptUsingSubstitution()
console.log(decryptedString)
import pntscrypt from 'pntscrypt'
> mysecret1337
const hash = new Pntscrypt(SECRET_STRING);
const hashedString = hash.encryptUsingHash();
console.log(hashedString);
> 788979711985162
Limitations
Can only encrypt and decrypt lowercase a-z and 0-9.
Versions
Version | Changes |
---|---|
0.4.5 | Add validation to Hash constructor |
0.4.4 | Add validation to Substitution constructor |
0.4.3 | Make char type work in validation |
0.4.2 | Add validation to CharacterMapping constructor |
0.4.1 | Fix error in hashing function |
0.4.0 | Add hash support |
0.3.0 | Add rounds support to encryption using substitution |
0.2.0 | Add decryption support using substitution |
0.1.0 | Add encryption support using substitution |
0.4.5
3 years ago