3.0.8 • Published 2 years ago
twb-zhash v3.0.8
Twb-ZHash
Encrypt without doing encryption
1. Installation
npm i twb-zhash
2. Basic
import {
zHashGuard,
zDecodeGuard,
zhashGuardValidation
} from "twb-zhash";
// must be as ENV in both side, FE-BE
const zKey: IZKey = {
key: "fShewpyamBky7dEP",
iv: "thisismysampleiv"
}
(async () => {
// encode
const deviceId = uuidv4()
const hashCode = await zHashGuard(payloadHit, zKey);
// decode
console.log("decode", await zDecodeGuard(hashCode, zKey))
// validate encoded hash
console.log("validation", await zhashGuardValidation(hashCode, zKey));
})()
3. Example
Cd to ./example
, index.ts for server-side and req.ts for client-side.
3.0.8
2 years ago
3.0.7
2 years ago
3.0.6
2 years ago
3.0.5
2 years ago
3.0.4
2 years ago
3.0.3
2 years ago
3.0.2
2 years ago
3.0.1
2 years ago
2.0.8
3 years ago
2.0.7
3 years ago
2.0.6
3 years ago
2.0.5
3 years ago
2.0.4
3 years ago
2.0.3
3 years ago
2.0.2
3 years ago
2.0.1
3 years ago
1.1.0
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago