High Performance - HSM PIN Block module. Provide PCI Standard PIN Block Encryption with ZPK as key for banking, compliance with ISO-9564-format-0.
This library used at the one of the largest bank in Indonesia, made by ex-banker https://jenius.com
You need at least NodeJS v8.11.3. I have tested in NodeJS >=8.11.3, 10.X, and 13.X.
const hsm = require('hsm-pin-block');
const zpk = 'YOUR_ZPK';
const pin = '123456';
const pan = '1234-5678-1234-5678'
// To generate pin block
const atmPinBlock = hsm.encrypt(zpk, pin, pan);
console.log(atmPinBlock);
Let me know if you use my library. Put your product name here.
MIT (c) 2017-2020
Contact author: Rheza Satria