{"_id":"ut-codec-payshield","_rev":"80-da5c5af1be2e5f9d4b4822bc03fbd5ea","name":"ut-codec-payshield","description":"Payshield codec","dist-tags":{"latest":"8.0.0","ctp-pan-error-refactor":"6.2.7","rc-cubalibre":"6.4.0-rc-cubalibre.0","rc-diesel":"6.5.0-rc-diesel.1","rc-godfather":"6.6.0-rc-godfather.0","rc-dss":"7.0.0-rc-dss.37","accu":"6.5.3-accu.0","keyBlock":"8.0.0-keyBlock.1"},"versions":{"6.1.0":{"name":"ut-codec-payshield","version":"6.1.0","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.7"},"devDependencies":{"ut-tools":"^5.23.2"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"c4208019ed3b98133297d3d3852e380c9ca88b1f","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.1.0","_shasum":"308410eb990148d4913c38e7f51b71307f062bba","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.5","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"308410eb990148d4913c38e7f51b71307f062bba","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.1.0.tgz","integrity":"sha512-LFoZTk+vKG582pSqnLOAjdScm3TlF2vkOqTeCrK+H9wruXo8OFIlSYvhZUR04yhb5GBM/S7Lo2NJgPlGrxXbEA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvjoOHhgj3eYJ1/62zZd223gyvHHM83wYJBl7m6qTPNQIhAOCW4EnliJok6qrG4tncOLbO7mB8VJzaT6nLTtFeA46E"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield-6.1.0.tgz_1508738376427_0.48897201009094715"},"directories":{}},"6.1.1":{"name":"ut-codec-payshield","version":"6.1.1","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.7"},"devDependencies":{"ut-tools":"^5.23.2"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"1192928ce6e8be9180311405b29100346e2778de","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.1.1","_shasum":"dfe28d53db43375d05e5f400054034bf873efc61","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.5","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"dfe28d53db43375d05e5f400054034bf873efc61","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.1.1.tgz","integrity":"sha512-TbpHKohn7lI9i5elFcZDUSXGQY8HKK4vCnHSXSsb0ir53vFNbRGRvlHa3a8lbUjQ+RMcd3jTBEtU2bNNTZfMjA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCufDwu8bvGrb9LMhumJmYkrC38wp2pUCl2LmDXfCVXxAIgEAeoT8qFpXsBCCfHoZCe+PMWRJIvhqtA8jq7u8wL4xs="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield-6.1.1.tgz_1508749176049_0.22972168680280447"},"directories":{}},"6.1.2":{"name":"ut-codec-payshield","version":"6.1.2","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.7"},"devDependencies":{"ut-tools":"^5.23.2"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"8a262845a142f0b24c28b27bf02c134269377af2","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.1.2","_shasum":"05bf1bb889a143265bd93601ff7bb72f79092751","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"05bf1bb889a143265bd93601ff7bb72f79092751","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.1.2.tgz","integrity":"sha512-0p+JlgiEqMXB9/D2g5ONNAhmq6VE9SxDoYqKJX5+zOj8mkCB/41y4KE8IPSueKiLOL2Bv786ghkpPi1QBhrOSQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBty2Be5IKLfNcPAoHNYlv6yf6VwhJvj6NSQeB+7I3HSAiEAycDkTUHWywkRnc3oVR64O07LkcubSRepWFLylJeuEzY="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield-6.1.2.tgz_1512086979539_0.20192395383492112"},"directories":{}},"6.1.3":{"name":"ut-codec-payshield","version":"6.1.3","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.7"},"devDependencies":{"ut-tools":"^5.23.2"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"2ac726b74033b56a72367d4580099b32d445d2fb","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.1.3","_shasum":"d322886a6181ec122b1732cf141e1889ef859dc5","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"d322886a6181ec122b1732cf141e1889ef859dc5","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.1.3.tgz","integrity":"sha512-EK/gAeyJiHgxFZozcmVMU4ybgE7BwSLoZwkG9JVvt/lB8035scAZ0yNM36laLW11VCnmD9akksszPwZ2LhNWkg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRv7V3dT6gvMc8ELXKm61lBIybVvgDsEcDju4zJqM/9wIhAJXwUXuNNypXxHTka80w3dVKLosV/izhMernK5N9t1ON"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield-6.1.3.tgz_1512556180501_0.12691959086805582"},"directories":{}},"6.1.4":{"name":"ut-codec-payshield","version":"6.1.4","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.7"},"devDependencies":{"ut-tools":"^5.23.2"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"8ead10697f7bca919c104e1b753161e126bcd754","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.1.4","_shasum":"77b6121eea8b010f2c01b2679b78ec3483e28bb2","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"77b6121eea8b010f2c01b2679b78ec3483e28bb2","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.1.4.tgz","integrity":"sha512-RUBA0hiMXWG0QJJ3+04XSlGNefj3e7qaLy6c+mgCHi9hmVVm7rU9qkmJpScNReRmEvzHbFfqUH20NM7UxB8psQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAbnftAtTFLukScvs1ZgA/kgVUudCFYuY895AyxT8T2uAiALEtPJDE8Pf85S/fQzSutSB6ZtpEI1F8mAM7L3zFK18A=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield-6.1.4.tgz_1515054562257_0.10538609838113189"},"directories":{}},"6.2.0":{"name":"ut-codec-payshield","version":"6.2.0","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.7"},"devDependencies":{"ut-tools":"^5.23.2"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"25d8b643436bf9d08c6ff08792c5776133262a52","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.2.0","_shasum":"b4e74ad55d48608cd39ad25c51c8071caedd90f3","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"b4e74ad55d48608cd39ad25c51c8071caedd90f3","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.2.0.tgz","integrity":"sha512-DrY9lq1FrKMcruLRu13WqEugOs5+eXAwlHKnpREcj2emOYPWalvy+ZExrAldb2OGbhoqUWRWCmUCXHhe3Zopvw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE7lu68yJPqwrdfPU1SZOwWHQHojZUxQuuNpALYFXq26AiBnn2kJUabkHEm6yBEweZVEgUl055kdKp45Eo5lF7YcKw=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield-6.2.0.tgz_1517930994905_0.7305971661116928"},"directories":{}},"6.2.1":{"name":"ut-codec-payshield","version":"6.2.1","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.7"},"devDependencies":{"ut-tools":"^5.23.2"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"d0d72a677e004168929f8afaacb75b5fbe2d29f7","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.2.1","_shasum":"dafe81b3881c1d81c3eae901f675909b40543a51","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"dafe81b3881c1d81c3eae901f675909b40543a51","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.2.1.tgz","integrity":"sha512-kuHAZiI/SGawuwS750wfz9jwYAw6Yqj+C1fJs1OqfcpKQJtKog4vU4EAFUAjyYniOOPpRRrLZMTLnkFoYAXv6w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEZYwDpzL5GtyFAJoeUv0BSbih7+dbIKbpI2gDl+HYWpAiEA0Ah5OERZnaoDYLoA59keaZzBJ9w/HbaF/1W0u8yrwzU="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield-6.2.1.tgz_1517934017735_0.41747244470752776"},"directories":{}},"6.2.2":{"name":"ut-codec-payshield","version":"6.2.2","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"35c7aa8f9d18f0d302848df0da65abb40137e280","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.2.2","_shasum":"8cc08f96f26edbcde6aecfa02cfcf02b30e15c6c","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"8cc08f96f26edbcde6aecfa02cfcf02b30e15c6c","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.2.2.tgz","fileCount":22,"unpackedSize":102489,"integrity":"sha512-SQOC0EDvo4JIHGiMsgpEMV7N54m942uCAUIRvR/Zz5z/AUU+tvTCMnsnNRhd0cS9APq/9aGRu4PWQnBuWucIiQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICzpUMb6o8FJIaguCwcG5SCTfJm7aXz9XxwE7ek1Y0GrAiEA8sUEm2KiRCGadEE37ILxGj+2FZtXalo001rtJas6q6U="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_6.2.2_1518667180571_0.6692633974332405"},"_hasShrinkwrap":false},"6.2.3":{"name":"ut-codec-payshield","version":"6.2.3","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec  \r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"d717e351229d76e3c17e9647d084b88e27bece05","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.2.3","_shasum":"0a134bed8924a6bca5d60aade31622574ec6eff5","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"0a134bed8924a6bca5d60aade31622574ec6eff5","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.2.3.tgz","fileCount":25,"unpackedSize":106816,"integrity":"sha512-gMpw7TsMQxyVs3eBJzF2Yr+LKRLQdmgmEQZITmP8TcDaTrOR6xiK/SmAQ/11qOU8bM6qqZOgzr9QAjBwBY1S3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkHEMk3ptbx2QgvWsKV9LKVMB4KOgf1Nhuoxpdapj97AIhANY8UKt8ogF1HhR2F4qpdjnsYZNC3PjCKlFw5zo7KN1z"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_6.2.3_1520874436366_0.8665000784775181"},"_hasShrinkwrap":false},"6.2.4":{"name":"ut-codec-payshield","version":"6.2.4","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec  \r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"9c9953d5c77173cc88ffaa69bab431dcd4da12e3","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.2.4","_shasum":"a25cb8e2174bf2f4c4e2b1d17389532f737ebb28","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"a25cb8e2174bf2f4c4e2b1d17389532f737ebb28","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.2.4.tgz","fileCount":25,"unpackedSize":107092,"integrity":"sha512-2QvuWeemmbVrbGNTzg4kIkGvhFQFfUjYdrZAUNkFLMoVynUGSzOUSwQnvAgM/oT9JKK8qIcfn3rMXQEToB5Oag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDU4t2iVzi9DeanUiewX7hnJGWBjBuLCXdu0zP5Uv+ptwIgTlUzkBjFTxLVvucPYf3NcqyLkjEtjEKcsLnHU3uKsaY="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_6.2.4_1521471529736_0.05506151261527581"},"_hasShrinkwrap":false},"6.2.5":{"name":"ut-codec-payshield","version":"6.2.5","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec  \r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"58d0826dd003a61789c4b93b02ba523c67418d42","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.2.5","_shasum":"374223ad38378561f75bcb1a7c0779117e9e18bb","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"374223ad38378561f75bcb1a7c0779117e9e18bb","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.2.5.tgz","fileCount":25,"unpackedSize":107643,"integrity":"sha512-Cei0b8TopGOz6/vl5WRgwJ2cX/wcg8bOvOuw5KFx6KGd1rAO2ifzALJ+FF11FDZQXgzJfjYtHte9PShofjKh4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJ84G2Q7gfGlEPDmMnn6k4+iaKUX5/WpTY81mEno8aQAiApnNccFCCIumzdEmGxeHVkvgAmhDGB/RwqBaiKaDoNfQ=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_6.2.5_1521742129230_0.21976464115895245"},"_hasShrinkwrap":false},"6.2.6":{"name":"ut-codec-payshield","version":"6.2.6","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec  \r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"1d2f23f214ed4ddfbfe8785465948396488776f6","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.2.6","_shasum":"3854e443cf2f266ea26b7539e719ff011220e45f","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"3854e443cf2f266ea26b7539e719ff011220e45f","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.2.6.tgz","fileCount":25,"unpackedSize":108117,"integrity":"sha512-XfTP/s5q71VAX84d12C/BoqJsEpi3JQj6j4UzO+nsElBXg7N3jS0CFG9xpL2fR8heAAC0wqIEom1LM80WXClqQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDDwggUA0W2KE+BKB2qXVCwXzp4PgLO9hlxs/9WChR1RAiEAidc9QBWBLxDBWrUISBcfczQ+FefEpyNVqXOdVcVfhOE="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_6.2.6_1521807554088_0.9341138947235681"},"_hasShrinkwrap":false},"6.2.7":{"name":"ut-codec-payshield","version":"6.2.7","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec  \r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"6fa700694615ad6405c3045355666ddd0e01ec41","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.2.7","_shasum":"c965c07ab2ee6b4502882b56efbe5f9278f5555d","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"c965c07ab2ee6b4502882b56efbe5f9278f5555d","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.2.7.tgz","fileCount":27,"unpackedSize":108676,"integrity":"sha512-1cjjk6hc6udz9hyLI25d0MS6LFm9nVb8QLESm9PE0BM1qev8STLjmyGqeHG6BkEw0n2qi+XZyihr2VaEqz425g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBSMn/gQhBWsWfQGrOZcPm07gVTzAXZHEGF3SXHLr0pbAiAPvNbBhtFLq6a3VDDV2Mg7zzGHkD8ofe/85kb1WRc6kw=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_6.2.7_1522232933224_0.76655731502563"},"_hasShrinkwrap":false},"6.4.0-rc-cubalibre.0":{"name":"ut-codec-payshield","version":"6.4.0-rc-cubalibre.0","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec  \r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"46a1a3d2fedd95b9991d8d873adeb2cf7a9c1169","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.4.0-rc-cubalibre.0","_shasum":"0097ac7904906bb6511c398fdb56161e71b6b88a","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"0097ac7904906bb6511c398fdb56161e71b6b88a","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.4.0-rc-cubalibre.0.tgz","fileCount":27,"unpackedSize":108691,"integrity":"sha512-BXpMGvCsQnzSP0Gc3k7Z4T2kwa5L7QxtiKSQkBJ31IJpJUPpJed+BQFlfZzrkSGhoU91PSiEFHxnrTXTDVpiIQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsfDyjMLJi11CyiJCp2Y6mNqRebyUuBBL+/SSzl4WEfQIhALQU7vmJUrAQlOqkqBx90Wp68AwsEu3TgXN727UcqDHg"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_6.4.0-rc-cubalibre.0_1522751928896_0.23476501381416548"},"_hasShrinkwrap":false},"6.4.0":{"name":"ut-codec-payshield","version":"6.4.0","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"b06d9c582175728fb87817043f496992eb7fe9db","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.4.0","_shasum":"cde931eedd9f53e22842bd1ad774e1df03cc0ab7","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"cde931eedd9f53e22842bd1ad774e1df03cc0ab7","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.4.0.tgz","fileCount":27,"unpackedSize":108891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa1e1jCRA9TVsSAnZWagAABFwP/0KKa8+PshDwkxAAgpd/\noCPsjw31cpJJXuX/FlM6215fTri5Nf61P7p9lTQ8Wmdhz9nZ0OyXz8MM4Iv4\nQyem/XPe+imjj40/r6gUtZOMVDThQ52DNmIydVxtGuugmlHy2EoAj15wuGbK\nda4e7L5UzXCQ303NzdXnm8qToI2NfGvsVpIiiqRlWEVpETRRcLBFoH8uuOUO\nlyLjnPDn6CNgB9BLa4qTxEyYCoQsF2iDR4YpEENdkBHIxQvCwOokCjsYPAv3\n5wqFlrdNhqKMPF+krP2mLklcHTHMX6q0EY9itWnG9l6d4DT1cqJ5YRk4p/VF\n6Ri/b6nueFNK7XQN190/Na6E9kS3LkCWJZKfc6ok8u7rsaCLgy6qDhpc6H54\nrLdkfTZAy2NfEluwjJ/Rzb0wT3ktEukiMgHwP3T/ym/jphZn3aN2JkD89yON\npV2yr8ztJsiWQH23uHypYHy04h+vi2SUG+RTj3l3p6ThbMLcLwm4evTv8tDd\nkod/DLuhu3KJhntFfAkdIQkOcsfn2fFJnD7V2uhngVynBDBEJBQrqn9wm2tL\noNtlMCifohij9QkVKlJhXKTIjxlPzi6awSJPmk4SInCzZqaX+F/fjGHlOZWR\nbB9OZRKzhExM5INAQ7dzPDYFE7CfI87Cz1quU7SROJvpdUiqDCynF5GvmBn0\nRUvf\r\n=B2Jd\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-wH0zjI7G5soN0VDeBdfywy4QzR/ojpo0z1hRbPUnn8ntGb3Ywuawx7bLPZjvRu5O7iYE4RsGqfu5nHy92i8dGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCihNEfgTYkkkaGhZLVkz/x40p5bCrxIWbVuh5Ssuu5WwIhAOOk30fYjOt0GS6bgL7nXJUzuaZn9j0qCo8P8+ynyzcd"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_6.4.0_1523969379443_0.6258282561158379"},"_hasShrinkwrap":false},"6.5.0-rc-diesel.0":{"name":"ut-codec-payshield","version":"6.5.0-rc-diesel.0","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec  \r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"a173d2af1127b66a5df505abbc2373f7e0b7f9f4","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.5.0-rc-diesel.0","_shasum":"a80fe58a7a7127bf2b946ee920b7017c34e216a5","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"a80fe58a7a7127bf2b946ee920b7017c34e216a5","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.5.0-rc-diesel.0.tgz","fileCount":27,"unpackedSize":108930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa2ZRRCRA9TVsSAnZWagAACAcP/0D6tqmC2Y4y1eIUfkE1\nG4A96br7NgJX10guJAg0j7dYE9cJzfVw5AZ3AsaGdpSbgt9NQp6CxEoRtn42\n2SMB0wQv4B+tyz3MafsGNarA/OTyuDrKnkGb/mlmbKwCv6UoXwOVBqICc7RH\nJaflk8avBvUOOgLMKkVfa4sqJ+PSNxbZuT2X6tkENEm/63PM5vyMjplZd8CN\nW6q03n5Vi+Zi4xPntAxrSq0ioWTq4cbaQj7B+oqZ/XQ5RC5WqMB1D74hdA9N\nUV3KGJG2UM7L89WP3o8uyKjjaTmJaQkuAtaQim7ELoW/saMMgix/RDSheXtr\nz6YJaPYmY6D9apy32wlqFqz/Zq5HFBW0z4SHtHUkNfLAPnW01lGIq8rr2+xE\nF0o3y+IjeoMGzExFPB16IeWyxFBlAJo101QY9H7rJtQiU4btYrgqeKr0uWmi\n6P+iZuk3AcWMAYy8cp7YKx5ll3dUVjQIpjNf0qxge8O+LXPD6J93/zxMc9DP\ny6VtZ1vIZ9hGGcyrNmJS7JCxY4xLxZC1/s1uJ2Jlrz++lPM8xrbjLw5er7N3\ngPrMSjvjNlCxkOMkoYDKrHcB2fLwx31ql/cOga1xUi0jplvTS/PgQIjdQyd7\n9LM+/omXwQQzdSbQQckW7xzI3M4gPW1YiCSO8KjaJwViQbWCrspXj7gYvMzv\nda8L\r\n=HnKa\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-m/pbn4s4Jqrvgenls9JLpzicUSZfPLpmzq/5dtSMxP3ij7XVaUzKNt73WtyZIsJPeBCkUEcpZtXpRg0hX8Wilw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaaEWmDju2DrGgzC8dGvjZbIrp9xkRIJIo+crsLoQtVgIgSh2wOr6uqoShjQmXsu+9Qx1S2TTAp0H4eidpSVyw9x8="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_6.5.0-rc-diesel.0_1524208720719_0.881850952879879"},"_hasShrinkwrap":false},"6.4.1":{"name":"ut-codec-payshield","version":"6.4.1","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"cd14b72a9367a7cc0b91eaea6a51948d960e32ae","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.4.1","_shasum":"a3b6fabdca2d8b99e8f837628b4661c7b20ca1d5","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"a3b6fabdca2d8b99e8f837628b4661c7b20ca1d5","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.4.1.tgz","fileCount":27,"unpackedSize":109207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa2ZSNCRA9TVsSAnZWagAAaFkP/1s+eb1oSDeH+bW12oZX\nzS0gGdCWyMyBifqW7Ewru2LzdeASx1mVtUHi8480GKGXN1NeOzVKzJmu4s35\nL36i9LQOmztBJprK5j1ZXo9wHxaypSDTnDyLbxTkFkQtLad4KJrQ7WWzmMiN\nuO8ISo9NbfYzt+r7o7qkbEyqvdK20DoScV8G3pCaxPS0HQTBPLZCTFsBCXxl\n9fq129dzr98n+DOktplS6tkV1G67mowncD9aPIOWfiM/28S+32SKwqSSvOvu\n5tz3lRAxXu6wwfP24ZDXkscT68qBPbxnKUzkDfDDnFZx7g7K+RBwYIuo4Gji\nIzocm/zdflGt08oMJSVOIN4B7SG0yhFq/sP883LBaaC7erJrG/H3K1uh81DR\ni17iXnLghasXqgalV9r+b0jLoLOQ93t+Txi2yxn4pIajfnAVe4g1TVV8is1r\nkF15Nbnx9XOq7Epr9LZE5bIowknUHhoqB+qHCDYLhaVInnGC2VuVGJxBUI/m\n5nEoDNKcEb42Fu+jzIppmBOBpxQup+vJWqsGYnKz77Dk2DhLjs+O0RgW29GU\ny2gc6Cvh6xJZzMry21cxt1VjB8Gljq7SVGgR1fVK4AkUQAizmYymd66h8ays\nchLwW8AWq/RbbTfOrKx14O65icsywrBjuGDcr4ImPlAN/K01mC6XwYUOUK/c\n3jsc\r\n=cHsi\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-Iot4enSxE5JgTzoHI87YX2jNSRfNASUWpdExM6kUcyuvLqhzHtPUmAOva+Yyb/BykOp/czWhirMvNR+CxU2heg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNIxCo0vsM67x2IlTbQr0iLNmEgAfn8+fs0eiNERn73gIgfAKvVKvXobOAUUuyowRubcXORM+mCfiIjr4P+23Hycc="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_6.4.1_1524208780439_0.36589209467929384"},"_hasShrinkwrap":false},"6.5.0-rc-diesel.1":{"name":"ut-codec-payshield","version":"6.5.0-rc-diesel.1","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec  \r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"39aca65c637b2ca1a9d06105a5d6b419567c9fc2","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.5.0-rc-diesel.1","_shasum":"8cc3806c72d436458e25d0c5c34759b175a58e97","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"8cc3806c72d436458e25d0c5c34759b175a58e97","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.5.0-rc-diesel.1.tgz","fileCount":27,"unpackedSize":110336,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa6vcbCRA9TVsSAnZWagAAkCoQAJyi/gbpljnRZMx9lp4/\nJe6mOXtyaD6ne0jXClsZtjh+hN0FFVSUqP0ygu9PPYYeDd6Qsppp/OiEdlaH\nL+UzxomAL7csQf9dJyFBfNFZnBOx5QiZ8opbsjiwbp7G6WdnZr359EGRWDnN\nC0b6xJNLGetE4SaBCVe/6n40KyJggnqe1kvz/UXZRzjsq/XFPCDteMJWekGv\n7doMHKp8E9IsZvH+lg6n+qLKX6S6roWG+iTnKXJbDX2P2TV+28FN5tephAfA\nnH6hVTKkRMlrBYeuKLCdLULoLPUoprsRFwM2ufezctFxthnqj6XSBD4Sq3LS\n2u/5dMB/11PTGcE+gGTc1ahyaq8Y2v7pgOqIi+Szj3Dxmi/vMkV3WqxeOnu9\nHc+VfQPTLi8uHagc5tKkaAnCKJtoyZm89/7y1uWTbCGkgslsMG1rGDroFQfo\nq/qITDL7+NPdJDr2ZyE3pCEcuum0uYl3bNwExgxi/K2LMXTMa5ZuyAtCS4Xo\nkrVaGB7JLH5285T8bChyDYTw8iXhaIVmfuD+1mVdGkisTLUQ0HAdIbbxmxvk\nFfr6u+E5eHp0uvAI3zWTCV5ofARRMArro35IkawAN0IzdPeXoBDQX62sSnN8\nfs0mH2xtGO0Ummdjqm1EpFcneTGV7cx/WstPl6jICYXCm0mDIZO8TxYgChHF\nKS3O\r\n=OJYy\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-ZXg2+KnSboQwXh/TPlredkMqnu9yGDwFxJVUbJhc2X51UGGVvOrzXkBuR+4kNJPzRbAqyJgzfnfpORRcgthMTQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYIHloW2V080wo7yl8y7C5ChAD91w1UmZVWPsABNk7sgIgX1HK2iFExBOIXodMBI3xeKIatwU0IEDXwwmmXuaBWyQ="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_6.5.0-rc-diesel.1_1525348122673_0.2992481587279052"},"_hasShrinkwrap":false},"6.5.0":{"name":"ut-codec-payshield","version":"6.5.0","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"1140dce321f6992a9fe022979bb738016a7f4ce5","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.5.0","_shasum":"c1b0ac81d0d96a03bece90ab089245b05f69b228","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"c1b0ac81d0d96a03bece90ab089245b05f69b228","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.5.0.tgz","fileCount":27,"unpackedSize":110892,"integrity":"sha512-PE6I2B1aReIyKovwH3IWNltGS7tYCD/vkMgrOuj21ikYUv5lK1j0Gls3HIQCoQ4yzO37wHjHVPfuT5TPIF+3JQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDLhWbiPjU8f0IkQgAnXVLffObfgHYw/aFXe9IfifM3dAiEAstq7lTn2PHwjyFCDrVXjfbrlw9rhOvRuwKzAQKv3rBM="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_6.5.0_1531231190604_0.5175909121776647"},"_hasShrinkwrap":false},"6.5.1":{"name":"ut-codec-payshield","version":"6.5.1","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"19df38f425d9f50e82feead5a98b948c795162ce","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.5.1","_shasum":"04eb4a57f1163a844f7b369ecf97f3b6712287c2","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"04eb4a57f1163a844f7b369ecf97f3b6712287c2","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.5.1.tgz","integrity":"sha512-mcDwBfLw2clxF2cpfLIypgr0l0tXheF4KolwBJAxsH2kcN2xG5pdzb3sTNtuhDTWwbThGfH1NCtPyFYSZvACgQ==","fileCount":27,"unpackedSize":113161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbX5HCRA9TVsSAnZWagAA/nYP/3xkHvNAyj5ZmC0Y6wJM\nxO70rSWLVwuzEBU6Qls4XkzjUjYRUl2/f/Ai+dnApz7EwAfZSbXzM2qvIWRG\nKqulU9IkaD4HtgxqeEg6umIAk3pdsc7QE8ekygv/iu9zZRcW8nYP6B3j5Jqr\nLE9AAbNHHNi8pjwMdZ0RhG0b96HGSafZTOY99A7iJ5OwfZ4v/rezYF6NuFem\nW+5XIKVS5EEoBGaIlEzQXHYHH2KV8R8vFtOIItyxcdj1I8HMYPg7/ko7ODGA\naN4Ityu2Sb17wOSf16Xg9ORuqs/bhjjt7Cwvp8BV/FzIxdJ4gkASJxS6BsEv\nUgOB8CQsnJZx1XG6xiuaw6rPoe6JCtIS5SDThUDasdtunHr0HPtgmo2qh11f\nzv0Yl1JrH7r3/NyrZ76OzlYMd7uhG+tCYPVyWwfBLHpTo5BQd18sRkcoaWKF\nHuZU6kQXXWj112/JslvgKXCCaDjUN4gOzNXw5S9mvFcdF2KKhbZWTcsoJkld\ngrySA7B3O79TT2qr+SpzhFnoC3H1F9HVUHYzhZmRSIUVRL/uXK1pApQGaV1z\nFeML95527sGlhmZzXh+RL8MTh2MEDt33LrvTIGr25FNiSAFv88qsmtB7NdG7\n46fYTcZu/hCqLzRvMo5pgOmR/r/UppP5tPccR5Hw4bILGwGnMt5k6dYJVbdl\nD0HR\r\n=y/Jh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDI7Q+AQbvMpxqXS4NMRduKNCEL52JbL6xkSUk8nTcqmAIgGxs6vlG0mlYMB5IMgFMlJFFCISNDkypDkEmo/Y26cLs="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_6.5.1_1533902407348_0.14217009635048306"},"_hasShrinkwrap":false},"6.6.0-rc-godfather.0":{"name":"ut-codec-payshield","version":"6.6.0-rc-godfather.0","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n\r\n","readmeFilename":"README.md","gitHead":"946c5e6480f9b1add5891f81ba5e8c60d33cfeba","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.6.0-rc-godfather.0","_shasum":"047a36b7fa0ec2f72466f3ade9e6dd81d1099a5d","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"047a36b7fa0ec2f72466f3ade9e6dd81d1099a5d","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.6.0-rc-godfather.0.tgz","integrity":"sha512-lOxu3jDkXk4g7P+VwiE7meKIezJgQKWQTAPLQJUjgceeo01UR0KZx76am7DE5ETkgeIoqCK4U9zd+hJSWWC/kw==","fileCount":26,"unpackedSize":111368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbtNknCRA9TVsSAnZWagAAjh8QAJpi13veUnij6HhSzk16\nLEkPXQncZaVthRh/9WJTFfbEo6EsW0jO47Rz8p+0OG5Zm4omEx/NPQFpcOy2\nwwDkmpR1nx4ZwFTxf0UpySzUY90jOnx+6m3QI8zJwLoOkE91JGE9UTKMfTLf\nbz7BnVDFO39bLGnrm8F9athA/XGlYbsD4U3Olr9i8xwxBOsrOuW+7Cje9TA6\nQa+Qxu3C/RTJ95mD98s4fNo+N1erX0DPWyjc6Pj7F/ebbIFIpLv663Rp3nFW\n1eU62gT+r5Icz83ZS4puAkghf63JXJDiWnIwR35cyQLmxwqHxo8Fzfr9l5I8\n+XZGQobUZMlPBvle+E3jJHkbXZX2WYHnkFtD7cpXaSRQPZcoGc6ez5zxS7yX\n6VksqyYsTWOY67e2okKXLyuUEBwoEBLeSpuAYM094+Ta5yjRSaVZyUcAg6JV\nQBrgaN3/6+q5iCaqXigpBUNXN5rXKykgcBk18NaandzQQwFfxS59Chx9eA3E\nlfl2zAosquK3PURMFv4VLIsHgNAmFOWBO0i6K85aEDac6u3uPXdjYq6rOno4\noNGv+kiTiHaFFkUvAlDoWemDtbr/qLBOfCUjIE/fIHaFLLMiLRuKXp6onLOF\ngJSGgHzrfdNMhWiYtFMcjcG8XVFnb7Zc7CbbpoVTr1V0KWzBGNrFAPQjInx5\ndi4y\r\n=WTcd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsewDDyv4Dp0M33cgeiZqJrteuJLRxu+Z33V3d1A+aIgIgLvNOxQtaNdozMLFSDoSYnfw0z9MeGIozW/EQJ9FTJcI="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_6.6.0-rc-godfather.0_1538578726113_0.4765192191779215"},"_hasShrinkwrap":false},"7.0.0-rc-dss.0":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.0","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec  \r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"d9e0ef725dece479b22c5b68b5f0dfdea55d1e14","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.0","_shasum":"20dfad575e765abd2757e58a07693bdb4e1f28d5","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"20dfad575e765abd2757e58a07693bdb4e1f28d5","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.0.tgz","integrity":"sha512-otKBXRsfN2QJAYRx+TVtMf4kw7izr1Y4c9WDoxRiLly+flKyx7jYWu9fs0zUO7/vWDMzJBYxPioPQ1x9Ip6URQ==","fileCount":26,"unpackedSize":111172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbuxo8CRA9TVsSAnZWagAABNIP/i20DILUWYk1TS6NDPRb\nQ+xVf/wBlBjgoHFVDnW7ZtAhIORsimB98TVRQ2LUFBxWep41b4JwB18q6Hc+\ntOV8kVurv6O+g/geH+ovju35qQwmoc72o1XffjXb8g2lHbp1+KDVnKF4Djwt\nA6Z+7kAod3Sf/EgmsYxwSQNTW5UqEBciE4aOVHiaKDRSIs/7Z/S4J7A8GLon\nEX7g/e00gPiTnrFMgtneC1g8nMamnPodGQUO652Rskdf9eP/ukYAdqL6XFka\nW3CPtPw171r8uvO/THLKsbc7pZRHOo/c3ulTIJhZ1szlGPGjq+HCPIyetMfg\nD+0Vy1dLAIUfyPD2ZJ0uabr9B7blKYVyJB2ELDk9MmsQT+mEkF+18DgPXx0A\nLUU5uVhEzPLCiH/rG4WFUhENJ6p0KrxSB/H3YbAWQniPHVbDitrOcDBIfA7R\n9VNqlQkwdiQoSzSJShpTI7xT/hDHtv2K8WboU5HzpWJZIH6RR1JEMZb46zf6\nVhSZ+HhggYQNmXSzpqOMrfmEKjghTCLk0cyWylPTOryeBPXVblWuA1b+YqyW\n+JQ/t1kdXq2XlPug+n5rCCKz9qw7Y+BS4RI5deCljMfcOKbn5gHSimeTbqq5\n2WX7c77RQQzSuA9OYHPFiaV6/AHR31pgy2dCOCIcCK8WT0KYeEZllFxjSxaR\noJE6\r\n=oZEl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBLFkY2S36hCgzipsaOBNnVvYueHInozBzSc7MdVBxxdAiAJCZCWpMY3ahmboGmJJsk8XPZDI4YBLNuRYDc1Lv1JHw=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.0_1538988603227_0.11506758322262911"},"_hasShrinkwrap":false},"7.0.0-rc-dss.1":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.1","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n\r\n","readmeFilename":"README.md","gitHead":"85b9951fcf1c00140971842eb47ce49e775344a6","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.1","_shasum":"90fa78c8b6fa93ff3179a2082d1f6d1a9d379db4","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"90fa78c8b6fa93ff3179a2082d1f6d1a9d379db4","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.1.tgz","integrity":"sha512-h/hiGYIl3EKXqhvic9c07aX1NtW570flQhhVbXgxx7d7PHVAzZLVkHJMrdWG6wcxFnrgpFprDzUKXzxteLzeIQ==","fileCount":26,"unpackedSize":111798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvbFVCRA9TVsSAnZWagAAHRUP/0p6Di7l9yQ01hq/yGNx\n3gYeDhbEAVUcLTYEOfZsdH01Si/oLcj6ZwZgAAjfKYKvsbp9100J8LFj85jp\n2KjG92jBVJIM4oDr5c3/REOdnfWasc5Qwe2KZPP4dUda00kAqkDUd7vZZjuK\nG2e2/nVw3WHHksZuHVoS7NZTty1qN/+kjjye4YzUdipUT8AkQoBIfIYJOwpq\nMmngM5uyGcdkrFuoAqKZ63k4FUpaGXRhHg8eRoDxGw+OPsMd7tmltdN9S2e4\nIb7LwunuRVbHXMXlPFcAuW73jIxcEcEripbRWdtGER4/bkBbiNK3UHSEhdgp\nSSMwmGb4jEGEfRDfAizqiJgLXLVUcCxXOT3CzZ2M6PF9Wv9tNilCQlmExQlx\nHHMYEiFn5di/9LpU1Oig9TTXXvCb7FJ5Uv60BCgElURRua3POVAIEcGsDY+T\nzmrVMpjykHfofKqlO06AG6pz9DStJyW6RwNBWUt2osNrmn7nhmfHjRpn7zIU\n18NQ6qmH+uetP9YoYOSppJ9/FX/iZTIxVJZBsjLts7fj+LFvzlFC+wsWAEt8\nEje7P/Qnur8zLNKdbOqvxCVf1Z5rnBICxl9hKzF/4jUFSaXmSNBK2N7Kjs6c\nIdK1MJPI9Qk+rFHn1d53oOSdm8qtghRAaSYGD+BJ9Lq+R+jjUwglUWuMKFx9\nQtj8\r\n=HGdY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpZyQnRfKlyXWL8UMdkGZPDaNjz2ZsCwrs1ZK4aphiAwIgcSqFnFkR44ED7KlBXVM2dpypWA+RnqH/oorgU8tOefw="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.1_1539158356865_0.15902388110385468"},"_hasShrinkwrap":false},"7.0.0-rc-dss.2":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.2","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n\r\n","readmeFilename":"README.md","gitHead":"a43b647576a86bed1f3f233785a5751f3d84d0f8","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.2","_shasum":"7013df09fc18651a02f3fb1f1e42c9bfab556ff1","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"7013df09fc18651a02f3fb1f1e42c9bfab556ff1","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.2.tgz","integrity":"sha512-HRhinFECcx/kvup4w6jcZrPcqtAmNWkzXJYma+MgmHCFT/3v6SyhqdM9delKV0IRB344mJ3p7zDZ5C+rqd4SwQ==","fileCount":26,"unpackedSize":112213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxb1aCRA9TVsSAnZWagAAVP8P/0WdjciqhVUHniPMmpDW\nk8bsEGygCDurozFr2D8+Qf53g4yt3oQUOELw+ecUgKiegZ4+ndI5p7bjY203\nf617DU0u7NuCJsYJcbS9wuYGeYtHk8Wqs8h7yTGYS11roqipD7+yJ2Y6TLdZ\nvAzxQ0/kROsHAD8OIx0Gbg+zcMq1lgLiswAhzHsMiG/AtvjcibMoJNnDPYlP\nKWyEZok8Nz0fUWEKPmV/YbYlIID1nEeBdvh4NvnXmWH8bIEXpspttsngbQUI\nepllkhyA19b6mgrrXo8JMI7NkazBDcxkg9ECXozQ8VCYkULJXAVFeKkzaX7t\nSNItkhHWb4OnvzOYWRcPD1PirvEjRiWfZCShmvuMW/mPM45QoxrWu8T+WEl9\nPQtkQvyG+ChgpZ8MKrusepGIy1E3hNz7IQR89D7yAZCSFwHPI5Gkry9oeIKr\nUeoennSMHyUFTmho0UIuuNk/qW+3hAQIEDpm55AN+4+KmjnQpKIZzAKcsULr\nki6PNjiydkbc/Qm1JIHhArFbJPFR0DrU7Ewl8HXmqQvrXWQkMS0J5L+RO5r7\niRi4kxySiV1y7P3Br42GCyWuI9mZaUBVjcybLy1xvostY6XS8EzlJc3SH5WR\ncrKhEaUGPHyq41uOwN4q0waqjtj2cHMaP5dc4dCD0AQc2vZPtON0Kj524jCs\nqHeJ\r\n=rSr+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQC6wFtwUe+PUueKCvpsAn4zLbJAiexJ25HDAz04rEcQIgQ35L93p1qf3UOqcY4RiM+FaiGPu0vifpuofUoD4lN2k="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.2_1539685721996_0.8837715835190079"},"_hasShrinkwrap":false},"7.0.0-rc-dss.3":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.3","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n\r\n","readmeFilename":"README.md","gitHead":"9e842591ec2f15ba2aa9505e9b36a48f6a85f3b4","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.3","_shasum":"399d8ddd3f99a749a9651d4e0a619c9226652e30","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"399d8ddd3f99a749a9651d4e0a619c9226652e30","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.3.tgz","integrity":"sha512-cv4YX4b/0jV8i0maDtx/UnE7Bdw3HhDWq5ejBtoxYc858aH0mo60Ty0FlMa1VJQyd/TXf2VJXdq/rj/ozDuNGw==","fileCount":26,"unpackedSize":112705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbza1/CRA9TVsSAnZWagAA/LAP/R9qGArJUs2LqQknlyRY\n7POsB0uPd8pHw/0awpqdOmN5UiVIC0fkhXE0hxSguw6UQLsxm9AUHb8YBIOc\n0AD2sZbd6OXLuRBZtuiBn7aZgYNPGyaVHbTE+fExtLJvkDa71lGAvZpqR2zI\nuGwibsw5E64Cf7548DGfqFyyQrv6GQxco9JnQOdEXJlVa5nuG1VxvVIaVsyF\n8PSK7yFMPLJYwaJJEwso5Js28ihL0Q9nI54KuFurq2XSKdIWc7wr8THd4dC3\n7ZMKgmbTZXHdOJn+aIXPqNdFCl21gtRGgf62b5B3bUPIcHyLkzmGVREFu/4I\nJ+Do7IXRlEipIcF46CsC9L5RH5zuNxaA5fzx+dCUiL9YXm+5wASFBHS3q4qz\n+me6clbrAX/TUq+2LSDHCO1e4fSTzMohYRFTsUTwrSm9Y0kGqeiwfBQTmJE6\nz2NEf4HDFO93IHaT459AQ0t4E38vO2P+IaDAGI9d6J05ugl5ODHLoWphTF8h\nXF1we6W2VAXPQGSZF2BS4IItNqIcqFhWMfNWQl40RBkC7ybWnaqaWl4BKVkf\nhcMH/+rPWHaE8hDQltDsJLUJU/jaDelSQ2r+O2fPeTmTjQPYnoB4J5ngTaqV\nX0EDoLvPfnIBIQNnl2xOxWdDdeMz4TikbM4muznTxhFlGo2qLZa4+9J0KSVr\n2Bsh\r\n=fdoc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsFJCGLAvDGQBE2FE38gXXU6SIHgnmPhYRzXQxiBzjOgIhAKx/tiPOl9/BPq2dG4kRU/aHrdDrGugJVJuDXuhI7L6G"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.3_1540205951034_0.8627938295156992"},"_hasShrinkwrap":false},"7.0.0-rc-dss.4":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.4","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.15"},"devDependencies":{"tap":"^10.7.3","ut-tools":"^6.3.0","ut-unittest":"^1.0.2"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"b63f68b34e1035d1205d4bdd3993ff931a752a88","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.4","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-haRS9BYISzwyarCUukKxvJa2gdT6LKxLN7mzql527UQR743YLxkH05ap0UMDQWq3+zyZz5I9ClN8gR0M4RCi2Q==","shasum":"94f6fc93c57604b68c9bf110262b22c353146132","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.4.tgz","fileCount":21,"unpackedSize":112293,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbz1ffCRA9TVsSAnZWagAACMYQAIpMvH0ig0wGboa+0uhD\nJ0CJxWAVYnNI5wbFUJdZdOfoWH5PyLNrOgHoSX87+FXn73mUfRdchv76GZrN\n7ZgZKhcYHb9TiR0H9fIsdmbM80M7zampRPFeHR4UkQaNSisVjJd6rj+g7Dx0\n+CR4+F7/+6kzYKuDfkfXek15QYUpCcGy81AZuUx+6Txb1YLynvK1fJw4Av29\n3DtnujYTia1kYsDrlORHastnq6Mbwk3Uh10/bcq63VDfMu7l6iVQRMSWufof\nMwC7BazrlaRzVksEiuY4WtupCpDfXPXQzV+8EulHXnz9A1abKljw4+EfH0gf\nemQ2T+5DH+Hu4hQT4aMHAAL2znfh5+Tt1BdIkC0Li7ePlLpldnygXZmh4XlH\n3WBqqMtx2R754/FjBP200oD9oUg7jatGDn2qdKR2Dz6tLDHpwXp2pHk2yDp4\nQ7zFvDq/kuJELSv54pYrWDOS9h1ubiWRgI77RbG7Avvbx9b/bEqTXWRgere3\nx19YvSXD+aoNSgQ0nqEepQYMGa2s57rkpemaNo/D0EL/9fqriJukIt4QLAk5\ngOGiCGEKEGus15YztlQsMFEODwUhU3D8FD8KKG0x/4tSP8+7atpxF+FdLD87\nCHIyCO6Aswp3KTUWntnlGzo6Zxmd8ngb0MNXNC6lKSXJ6toi3K68z2bI2Fwk\ntFKR\r\n=uV3V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKkmjNKp2cxJsFYnf3B5swagiBXv5HuhqY+KFsGjWxYAIhAMNZcTer8/p8CtyHmfuhyzuDFO65UADejaiKRDJFO2ww"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.4_1540315103088_0.22274956283943137"},"_hasShrinkwrap":false},"7.0.0-rc-dss.5":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.5","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.15"},"devDependencies":{"tap":"^10.7.3","ut-tools":"^6.3.0","ut-unittest":"^1.0.2"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"b4e2b73d3001627b620625d1b059e79cdb5410eb","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.5","_shasum":"672dd139e1324fea7c30e98b91c91e8b85ff461f","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"shasum":"672dd139e1324fea7c30e98b91c91e8b85ff461f","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.5.tgz","integrity":"sha512-4PIppDGwDR34vGhRclFN4dcnDURQDi8s47GUf2JKWUXQnCBHIT3YP3ASkN0gqcYw+L5mB4tN7+pUP8N0loUwIQ==","fileCount":22,"unpackedSize":112384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0DbCCRA9TVsSAnZWagAAgfcQAI3kHcFp7leXshHZ92P9\nxCjR2OFZbF+TbnIemsT2R8URRaCE8b+LzwG8rXISgVCP6TAYb82pJPmfqFl1\nZLtKmmfMnSX8TCzE8HbEJfc0XuQPO9NIxRb+pmQOVtX+Km/KOmYtlW3n5vHi\n0RyIW9FNHE3ubJ6ITMjs5Vlwu3SIyi621JXWOif4mzUL2VlBi10WbkqAaDkw\n6hrosd2zD4PYaMcraDS0ZqToCSFyYVa5V/SzXDJ/ru+g3Mg5F0Fz99vD6vIy\n7EUxxxO3h9lyZagS8Hjw1LSn8Q+OAGPEVvHV+YWJ8E+ADuanX81ErU2QnJEp\nR4t45bFbEehqxMQoDljOMhoGBJ5XmRLFVXWv1IU5k7x57k2KLRLHi24B/um0\n7ksVFImgyS/PKOZvfVQFkUzNTX5XWTUfBM7ZI1EryscpfICxbTjUvlKBuuXL\nbmfguf9hihR9pU45EJ8cpcU3KUbALS8p7aWSE62IvnvnJ5nswPlYwT9aiHql\nolttUn7uEvHJsM1zf/OI+qaO8tKjjxAGpRBUd0aY8JpYf1RazwJPde5WW7P2\nZN8B7UZBfDTHej7vz2y7Nde5B/UFdFzpu3ziI3XsKgAvs4Hlyyhgzxpr82tX\n+4wClS4H+MJeR3S2TbjXrR2AVukR4wpoacPiyEl2aJJnRLwsz2dcI7ys9D4B\n/03Y\r\n=yLy5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMuYxNN0WnGAG5fXUDXa/mYDRf0PFFK1EOfY/M4aVGUQIhAJ1egz4Djx+r9B2YIEyjblWpJtVW2rQhwNACLaN9CcOh"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.5_1540372161346_0.04708093707552763"},"_hasShrinkwrap":false},"7.0.0-rc-dss.6":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.6","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^10.7.3","ut-tools":"^6.3.0","ut-unittest":"^1.0.2"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"416f02456b24aef4545786b4052b0400f9afe7c2","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.6","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-XDNnq3Zw2s92h6it346p3cuC0n2nxmhH3NTW24X2DhYIcLapg1Fz+vd0+47hfvbb+zFYbwXp8WvseKbTU5DBJQ==","shasum":"816745e524ce8503c77541d1f3fd8ae82efc438b","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.6.tgz","fileCount":21,"unpackedSize":112293,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0XegCRA9TVsSAnZWagAAf0UP/18VTZ8FsJ4p40Gnef0i\nO9S3bQxuBPFRpBfoxNjPX8+61RsrkPlB/9Y2qx9oOlBk/BrRKaSI0sRg58a4\nsl/BXUnAXNXIS8DwsgeWoohs3+zheuU7vypYnOZtYfZSdVaniHzKJrdy3Sp7\nIvNNpQgEN1a56yWniNLF9zSNsXxFbWtspccsGV1IsbtIAE1z9rDd4QuLxj8h\nFstRjN2hAyDa6GgFddCmcIX1w4mrmkhZmcm8p9YhNvFVzDhpdR3J9uzBIeyV\nS466FSlFIc0hOSBIuvseQqurlaHAEw26+y5p7VccuWqKzHmN/l3XlYUSsecv\nYkph4FPq/yY3G+XmKyjglj7/D7LCkIqk9qLcEhux0uX09ei4oiYi3IMM0dPy\n6/jOVEtd5sDAedqC5e+EqP44EUHZd9VArI4wsLeCue0EzwYI6snY0HizCrEq\nk2jqvWlS1LT9P2FcFSAIuUbnx9lF3UgJ0Z25ApfmE82CBWsyDWqAW1XtFF9a\nOxnHE3glIKcIY8Yxt7W5qhvkkCSFmK2EVa4SBrduEhvedgHpy7+DbwRGXhI6\n9YCuz8gQhLpY17Bvz9LWv5H0O4DM5m1/GCUTPsWJ2yIb8o1NPQdOwD+TbY3L\nMyFpbv+IpPDqAX3PCk3qsd93686YCpzIauvlP5ffpfjDMGzFkYdHVmnDqA5V\n+ntM\r\n=ydD3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDo7Pk2XTbiQOCxnHErYliIfgJCURDsXPDBU4R+iwwffgIhAKnmby2PeHfAb87UZvpw3sYrA+MwK0UwuSbfPPMuHzFs"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.6_1540454303540_0.40602190786787573"},"_hasShrinkwrap":false},"7.0.0-rc-dss.7":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.7","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.0.1","ut-tools":"^6.3.0","ut-unittest":"^1.0.2"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"c50f20112e703dcec0f785e8693de2205288217f","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.7","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-di+4Tmn4yMaRDdKbC3BgCD+tBcW5yUJ8ESX/5TghBtfRJvljqcRGvrYdbQ40OCZsrwvVRiWGk2aCcL60f9WU7A==","shasum":"123d076d21860a5eb096753a4c32238453137f7d","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.7.tgz","fileCount":21,"unpackedSize":112293,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0cUECRA9TVsSAnZWagAAmogP/089afzS5SV510wNKlki\nOPUYBRuOzvfIIOrWMUGHhUO6/VnwbVrO18ZZ/wBYkBlOKNhXMAetA3+fZBWl\nnOf7sWQAtioOJcOWDe56pNkun9Df14iPZxgChEL/d0K2BdszT1OlG8V8i4p6\nyXVHYRLBThV0L+Zlh6geJGtt5GmyXXV/qOFiJUDMdV3M6rocvpfJz5lZEQUz\n/7VST+JUOcQQWCGFiBF5+K1xrLT7lDOM8FTXTUDIxqePrxinzwz77KCeMrx9\nJIQFlHMlmoNe/YaLbSYvFgZs2SRZ+b8RtdY98EOOwX2E54MeMi8iPA9wW/Gt\nBxeTD74NAU7A52oc6/88YIpZZyN08vmq46cJbX8k5zepSaEBXaBuNoxEq96r\n2SgwOxQLOk6tIQ+HnnQAC0nkE66abwAJn98ezTJkaG7BQj7ku++z0OnszSal\nxp7fohu3OL1lFq6VCm6szKyVDKKgxi1ryrE+LjgrQ4hjbwgmAbf3yVE2So3j\nzdGxK1Lnpk0ns7jpEv8MlkzIQoHCFaTCoGD77hRIjyTB4JQYLqEdUp7p0bmX\nsJA2Bn19dMFdGq6z/c6TpAi/jc5FkS06DiVgIsGO6vBE0EcoHCXU1FjozCqf\npk4dOIJd5HnbZ6F+ClAzPW+ZR4LDjJ3qMKnZxB3CcnniP2uhj0uaNLBVjpzH\nUcGf\r\n=BkDx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbtflAE94qqvN9gpiDnBsvLWYCWbOg5kmP45u1DekIJgIhAJWGgpJ5Oir9vt/s8JfaE00QnLRXtT4MvQ3KRWTK4AOo"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.7_1540474116202_0.615703194990934"},"_hasShrinkwrap":false},"7.0.0-rc-dss.8":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.8","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.0.1","ut-tools":"^6.3.8","ut-unittest":"^1.0.2"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"f2d2347ef57077f044ea99a255849e0c9a4e8415","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.8","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-UnsTGkabiPuN2EesxVHUNMJ+zjm5O8HKnxKwvtXaRUXThfzWVioqkU3PIeF8Y6vEEk4HsWIaAALw3EO/zsxuUQ==","shasum":"90a64b83f0ab19521c326c4e245b19220bf4c9f6","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.8.tgz","fileCount":123,"unpackedSize":1556383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb5FF1CRA9TVsSAnZWagAAgFQQAItbzPhoUleocnKeXBBG\nnLkxEdoLOH5KmYDZviEwlg7RAWbpiiAWgV9tZquLLEuqCLRIvqUY+9zkhYui\nI5tYV10JroZcgyIS33yqM3cTKaTxWTN1vL92zNQKPz5uzTj4khbvBeK0vHjG\npx8VDgJTZC9s5xlxHAgta+GpMiGmq80Dfcsx+XTR/XGUxTuBFIXUzRuhfX6D\nHv7ox05sGLyKF2tXdsFUPHIAzpU1VYOid0djquTGjF/MaNSJaQR2EY/Vmiq+\n4ol+XTscEvUsFLcgbKeb3SygHp2w89xY5kwGqzAq8qebHi4zq9J7200eQkoh\nLaXc0FceoeablqlTv6b/dkNTo6+aeB41BsR1nB5gFkQzV4cQ1wArC+sWZZpy\n3kljLpbeZhoRwLCzL+Av/CwTJ2KUdIO7Q/KTHpDknd2fWnzyL67LRRVdgHz/\n8D94NLVhpVS9uF1f0QOCWZT1bJwYOsSGjUTK+F4uUmyqQ930PpHaDLrWzAQK\npSfyFMpfwTdnW897R2fPoU4kbSd/nLZnu4dyvHdWQ4p2noQir/YNQaVgHGcl\nen+Nbix2aoSD7jPupW4JGrLowakX92b2rR6aVSu6bUp/in6pczFh35ZxioX5\n7s1OInLjfYMPLKAC8XAFbmHq1EnmzdKuiR0nBvweBqjfVQsNJfndw27MB5ha\ntTT/\r\n=6lJz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCL04mKDyu38mFl2MloJnQwE53RrsNkCea2/L2awVGY1wIgIlgEezkIDXKro/p/RNJjSSpNWA3R6FBHL+Lz2P8Edj8="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.8_1541689716559_0.9380462197531725"},"_hasShrinkwrap":false},"7.0.0-rc-dss.9":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.9","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.1.0","ut-tools":"^6.4.13","ut-unittest":"^1.0.3"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"20ed4bf885d694748928567e918eb4897b011eb2","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.9","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-k2mYlm2oESSt0lilELOL0Bd6ytKeLFF+y77FS6jC4UN85G8McaKPZTj2A7Wb3atCZXMYXpNumRbN/SMOI6lLUA==","shasum":"f5242869d79f2600a8e54be579e70f07d50d2e30","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.9.tgz","fileCount":139,"unpackedSize":1779533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBnLuCRA9TVsSAnZWagAAUO0P/R9EV8L6tZVnOWcI4zj1\n5AHK6XkbZ97SO+i+tPyeztazNMp30FAK2LaGsR3KAFxq3CCsrfqCMrz8hXrW\n634LqC1g2hx0HjZF4cau3vojkAOzj+nk2wao+cgrX+H+qxkvE8D3T0nH7MKM\nhfUsAoVdZEqzRSQ2hjEOaMNXlnv+pIvQP3/uivK3SaM9w62xWacXRTFDM4de\nDEFHyGluFQXHEaH3tux6IGYhZ4/+Lz4Vv+lSqopCG/hCuxMhIj34X7j4sJeF\npHoW2Uu8bhzJhB71qPKJH+LChT2QMq3QeHEHyXvKXec3qnWyDr6L73zMIpPJ\n/CWnHeYj68iExvCeD1yyBObRJjZUVaf8Pn0PvMnmgr1jctL0n4VVobOl/o18\nl0FXk830RdZwHtxn1qSTPcEXlj1T4/772l20OytPnUF2pOqSf1W8WCl8jANr\nTZZ0ZQMVr/6Q3O4HC83nztyCEe+0jzpHv9RxWq/8uyTJg/jlXBpIPAKd5KHp\nuXTUXKp+Rw1BuedSYhrQkHT6uUZrBjmHpb342fxBCcjY3f8jOaH4CAXOhHVl\nuO6dN9j+ZhoALLHiMieaHxXbdXe02MSRV+NNbnUzq2z9BXt7NcZPkhjCCC7O\nf+nE+TWdmBaJC9BkLUM09hHKVtXWyOiRxjLk4ElVZbt6uC7y+++1bUB9zYau\naB5m\r\n=BQQX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDNjlkxV8wcb9SRj0s8OgIyp8t+FfXceXOUG2QUiW2ujAiEAwjjgFcyOnoSSo/N1YDhC7CzLlsnHDox894a1lwW3DsM="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.9_1543926509798_0.06067764418268995"},"_hasShrinkwrap":false},"7.0.0-rc-dss.10":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.10","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.1.0","ut-tools":"^6.4.13","ut-unittest":"^1.0.3"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"a22e80e423dc9916d2ce2bc6042e6e01a5a83fe9","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.10","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-XsNiUw3P1wpjFzjwAx5JolFNHuBBiYjt8NLWzBto+COHmKLEOolAZcIp4Gd4mUMIL/vmdPDYmGT2BvGh5iaIsA==","shasum":"5740d8fb214852d6199be77d86218c52556ba14e","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.10.tgz","fileCount":143,"unpackedSize":1833408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEmEJCRA9TVsSAnZWagAAaPkP/2n1EG4wGUdiq0ElD4Zo\nm8SnFccB54D1t+QmF9Qo3WXRhNB1XGbcqysbTJG0RnX3RfeDFMcn6Lopc9hL\noQLAwN4HaMCdP/nXOzkcQ7w76eRJseVGGQbneaSmZ0iJ5KFqLNM2WjNcv3DJ\nvc5sYRJKtifq58dk8o+CVjVRvY57RXGwWeH0+V9Ldv/oNB1c14Jsj47APq/V\nInckYXJk58G9ShYMClhkmrh+xJsjNkP3BaDQHVg3wlrRgCDANyO12I1do+jL\nk3RGu7JsCqv2uja70AcVB745eTeliUcumaiNbw1/qIVKj9aDOXpWjyIcX8b0\nnsmJF41xwOe+Rqj3OTBzBPRrw6yPbXd2LjCZU26NmkIxzDPrI+fX7vNIfH/o\n3KJLIiKts/RNYiscTldas7bXDZxd4+6AmkH/LgMFYHrB8cX1ZNmIFcQ+u9jj\nEcGyW8B/T6x7CfXnbCrJPCjo471ovUcssjDZ7X/JsqL53RaJshzdAE0odk6y\nupjgCqKhVBuxc6TLl44/WLnHRTiXb8e5RkowXj7uRsy+MH7kDGSu8lSLEdNX\ngFtC4SRHWCz8IiiwWuZ6HJ11P6tijW6wffQDUJFaTleOY1DMIKasgLNNyu8v\nJAc7gdjbglYGy3O0Rsb8Xp2jerOIOXyATTtMyoMk9lStJ64t7lGybBarNP0e\n/FJ7\r\n=ZOnb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA1OnbYFjmY+6kT6hJBaWrCdjcGGS4zg/zvfxOyUEe5aAiBeqEEpeYKkNoi/QLuU7MeMEIqfNuNUFFcHhNeIN8UTGQ=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.10_1544708361172_0.3149902171410144"},"_hasShrinkwrap":false},"7.0.0-rc-dss.11":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.11","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.1.0","ut-tools":"^6.4.13","ut-unittest":"^1.0.3"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"5c8f281b3232945a2e7af746c769fff500591e6f","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.11","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-+8o9j6WSAaqXRLm34C07CfmRw5az1kDb9kJTTxTla9QtHL3I/eJqSp+Lz01+ETbnYWjyKNK7za6lf/lLImT22w==","shasum":"8eb67769c024ab2113a01d47c7d6bd4b44b8d8be","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.11.tgz","fileCount":147,"unpackedSize":1889441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcO7T1CRA9TVsSAnZWagAAsTsQAJ/9K73dU7y2uatjED2y\n4kkV/hnDX0l3TZBsOwr62jwfGatxBDT3TUHdw6CAZ3dC84SAu5nqbDCVJP/U\nz+UsjBl2B2RL7RZfOWy6lz3dP610eSUi7CSaDcXB4iZXsErIDtV93O7fPQuR\nuTMI6eT90lktP64Jo3Eu7z0G0kG38EY61yKNzjXMceamABn0Z2wShABMzNNw\ni/5ArOljhl3nTYxXS4Qnqxm0bGccSqyw9uVavie1Ph+yJVlkiv5a2SSU24dM\nI8fI898x2hL+w1cMpzP85I2SY8E+y35ZN6U+Noz4pzYC/9c8A8npQHBo3OCb\ngeXgPNqwbpiSgtTXP7E0Cdzn/snC9g1DjVKJQm87DgIkvSGM9XgLXlRI15JJ\nZ1fpckVprlyPfu2EPeeb9c0avHoXZwYBSXijcJ+9WSklJwz5VyGd+V82N9KS\nCagcHhnmuWiQyxS2gYL0dSmjXMd/NRztXPu9jiVCpEq/9meWnItGrViX5RFb\n6+747swM5oEebOtanlhfBdlHWb7mfqVKcScuxCKZO5SpzFl4jPMecXs9Pcw2\nj0RuxmMh8ySDO3RZguFt14tKGM8g6JKKpSCcyIi8KmbkedRHoc+eksy0M8ZI\n5tWhVenBGte+KwqYaRwSo+biVJEN137qAHIjqF2A9nqUz8pVtNRTyXdw/0J5\nbl8Y\r\n=utGf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkwPlBU5VPIrRFlG+FNmfzTUGUsuUhMVrYIwuB4uNM5AIgKZ7JKTsDw6e8cHBDufH9pbbosKghulX2dmZNR7QP7Ko="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.11_1547416821218_0.10271873751442873"},"_hasShrinkwrap":false},"7.0.0-rc-dss.12":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.12","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.1.0","ut-tools":"^6.4.13","ut-unittest":"^1.0.3"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n\r\n### Mask Logs\r\n* `maskedKeys` must be set. It is array of items(fields) that will be masked. Item value should be taken from `messages.json` `requestPattern` for specific message. For instance if there is need to mask field `keySchemeLmk` in message `generateKey`, `maskedKeys` should have following struct. `maskedKeys = ['generateKey']`","readmeFilename":"README.md","gitHead":"a2f1f8fc8940faa38c5903357d43e8e737c4f4cd","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.12","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-zsOq0Ed42+oT75epOW9pMNhOYCZoaYZRLv2/vGdwhhxs1D3Uszl22PNEK35iAgIsFQyybQGw78fcNgtP98wEJA==","shasum":"1313304d8329dbb63f73fd45ad86721f729270b4","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.12.tgz","fileCount":160,"unpackedSize":1988431,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSY78CRA9TVsSAnZWagAAyyAP+QExHAmX2NbGGyo2CgFX\naUR4sH4v4JPHB0wJIQ8L3IUI0irFq5UEeCDA1WndM6n60iHIzLMxUwLuP+/M\nmXTh+j30kI2e/h0qfdiu1msYkmdydB5lotm3t4QbbW8z2YLHeAirSwN+VC7+\nVetIf94coZgu44tRWI/GyQtCuPK2F0L1XYRNefjH1IvLZkyI4vuxu38jknoj\nO8OOOmGU6N3dlAo5QGolpLgFd6PFB+dwck0zL8RfS0NUes1KfzOQn9nXo+8i\nTeXL0TSGSsO/7BWNbRAXj6EeG7Zh4ocd5a/7GYhqiNYfQKxta31Co+49Rn/Q\nWIbkWvVYyKbvYnX2fG7P63rHAzbRZ9oIoIEr2bsXAWwQvG5jSqp/J4cgDeeJ\nsYqtIxt188gB9xB4pfKDqrXIlKXB2QTEHxeTVT4LQKW+hxY7nNB6e6QBbgYD\nj9N8W6zpJN5OPdFSFUYFEnhpPntDzX9lj1l8g8GC4NEsqlYQsIVXv+TZcFkZ\njFJG2QZaB8G4JHlaXxXBxPQjDMnfFdrO1o3Tg49X36nZdiaikZeuSjfNysdB\nfEvygruWmYHhaMY67nUuC6mHU/p5xLB6u3L1X9nrHFnObpQbdN+3Jn8h5oSL\njc2MLP5EHvNCKJecEYOIVJQ0IXOkxObMmUaZYl1IE70LSwjsutpjySlOmmmG\n0veF\r\n=IhDu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXI8Ek0XnxmRf9kwYqmLABQDJwDumNShxdjGHb4pcZ4wIgUI2zYUKyQVlHTkzGHyeIg8dEZjFD+RcRn7dkb2PGnJA="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.12_1548324604263_0.7216513571724901"},"_hasShrinkwrap":false},"7.0.0-rc-dss.13":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.13","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.1.0","ut-tools":"^6.4.13","ut-unittest":"^1.0.3"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init (config) - initializes the _PayshieldCodec_ instance\r\n\r\n- **params**\r\n\r\n    - _config_ (object) - codec configuration\r\n        - _headerFormat_ (string) - defines the length and data type of the message header in format _length/data type_; **for more information of the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n        - _messageFormat_ (object) - may contain new command definitions, or definitions of existing commands to be overwritten, or parts of existing commands to be overwritten; **for more information of command definitions, please refer to _Payshield commands_ below**\r\n        - _maskedKeys_ (array) - request/response keys for which the values to be masked in the log records\r\n\r\n- **result** (void)\r\n\r\n### decode (buff, $meta, context, log) - decodes data buffer to JSON object\r\n\r\n- **params**\r\n\r\n    - _buff_ (buffer) - data buffer to be decoded\r\n    - _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n    - _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n    - _log_ (object) - contains log functions; **for more information, please refer to _ut-log_ documentation**\r\n\r\n- **result**\r\n\r\n    - (object) - decoded _buff_\r\n\r\n### encode (data, $meta, context, log) - encodes JSON object data to buffer\r\n\r\n- **params**\r\n\r\n    - _data_ (object) - data object to be encoded\r\n    - _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n    - _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n    - _log_ (object) - contains log functions; **for more information, please refer to _ut-log_ documentation**\r\n\r\n- **result**\r\n\r\n    - (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord (buffer, data, {pattern, maskedKeys, maskSymbol}) - replaces predefined data in log records\r\n\r\n- **params**\r\n\r\n    - _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n    - _data_ (object) - JSON object representing _buffer_\r\n    - _pattern_ (object) - _requestPattern_ of the command, as defined in _Payshield commands_ below\r\n    - _maskedKeys_ (array) - keys to be found in _data_ and their respective values to be replaced in _buffer_\r\n        - (string) - key for which the value to be masked\r\n    - _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\n- **result**\r\n\r\n    - (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in _payshield_ namespace\r\n    - _requestCode_ (string) - _Command Code_ for this command as defined in _Payshield Host Command Reference Manual_\r\n    - _responseCode_ (string) - _Response Code_ for this command as defined in _Payshield Host Command Reference Manual_\r\n    - _requestPattern_ (string) - request pattern definition for _PayshieldCodec_ _encode_ method; **for more information of pattern definitions, please refer to _ut-bitsyntax_ documentation**\r\n    - _responsePattern_ (string) - response pattern definition for _PayshieldCodec_ _decode_ method; **for more information of pattern definitions, please refer to _ut-bitsyntax_ documentation**\r\n    - _warnings_ (array) - array with error codes to be processed as warnings instead of errors **for this command only**; **for list of error codes, please refer to _Error codes_ below**\r\n        - (string) - error code to be processed as warning\r\n    - _customResponseError_ (object) - _key: value_ pairs object to define new error codes, or to overwrite existing standard error codes **for this command only**\r\n        - _key_ - error code\r\n        - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_ - Generate a Key\r\n\r\n- _error codes_\r\n    - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_ - Form a Key from Encrypted Components\r\n\r\n- _error codes_\r\n    - _03_: _Invalid number of components_\r\n    - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_ - Import a Key\r\n\r\n- _error codes_\r\n    - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n    - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_ - Export a Key\r\n\r\n- _error codes_\r\n    - _10_: _ZMK or TMK Parity error_\r\n    - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_ - Echo Command\r\n\r\n### _BK (BL)_ - Generate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n    - _03_: _Excluded PIN count incorrect_\r\n    - _10_: _TPK or ZPK parity error_\r\n    - _11_: _PVK parity error_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_ - Generate a Key Check Value\r\n\r\n- _error codes_\r\n    - _10_: _Key parity error_\r\n\r\n### _CA (CB)_ - Translate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n    - _10_: _Source TPK parity error_\r\n    - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_ - Translate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n    - _10_: _Source ZPK parity error_\r\n    - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_ - Verify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n    - _01_: _PIN Verification failure_\r\n    - _10_: _PIN Block Key parity error_\r\n    - _11_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_ - Generate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n    - _10_: _CVK A or CVK B parity error_\r\n    - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_ - Verify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n    - _01_: _CVV failed verification_\r\n    - _10_: _CVK A or B parity error_\r\n    - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_ - Verify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n    - _01_: _PIN Verification failure_\r\n    - _10_: _TPK parity error_\r\n    - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_ - Verify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n    - _01_: _PIN verification failure_\r\n    - _10_: _TPK parity error_\r\n    - _11_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_ - Generate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_ - Generate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_ - Verify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n    - _01_: _PIN verification failure_\r\n    - _10_: _ZPK parity error_\r\n    - _11_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_ - Derive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_ - Translate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_ - Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_ - Translate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n    - _10_: _BDK parity error_\r\n    - _11_: _Interchange key parity error_\r\n    - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_ - Hash a Block of Data\r\n\r\n- _error codes_\r\n    - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_ - Verify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n    - _01_: _PIN Verification failure_\r\n    - _10_: _BDK parity error_\r\n    - _11_: _PVK error_\r\n    - _27_: _BDK not double length_\r\n    - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_ - Generate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n    - _01_: _MAC Verification Failure_\r\n\r\n### _KQ (KR)_ - ARQC Verification and/or ARPC Generation (Using Static or MasterCard Proprietary SKD Method)\r\n\r\n- _error codes_\r\n    - _01_: _ARQC/TC/AAC verification failed_\r\n    - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n    - _04_: _Invalid Mode value_\r\n    - _05_: _Unrecognized Scheme ID_\r\n    - _06_: _Discretionary MAC verification failed_\r\n    - _10_: _MK-AC parity error_\r\n    - _11_: _MK-SMI parity error_\r\n    - _80_: _Transaction Data length error_\r\n    - _81_: _Zero length Transaction Data_\r\n    - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_ - ARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n    - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n    - _04_: _Unrecognized Mode Flag_\r\n    - _05_: _Unrecognized Scheme ID_\r\n    - _06_: _Invalid YHHHHCC value_\r\n    - _10_: _MK parity error_\r\n    - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_ - Encrypt Data Block\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid Output Format Flag field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _10_: _Encryption Key Parity Error_\r\n    - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_ - Decrypt Data Block\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid Output Format Flag field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _10_: _Decryption Key Parity Error_\r\n    - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_ - Translate Data Block\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid Output Format Flag field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Actual Message Length is too Short_\r\n    - _07_: _Invalid Destination Mode Flag Field_\r\n    - _08_: _Invalid destination Key Type Field_\r\n    - _10_: _Decryption Key Parity Error_\r\n    - _11_: _Encryption Key Parity Error_\r\n    - _15_: _Actual Message Length is too Long_\r\n    - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_ - Generate MAC\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid MAC Algorithm field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _09_: _Invalid Padding Method field_\r\n    - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_ - Verify MAC\r\n\r\n- _error codes_\r\n    - _01_: _MAC verification failed_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid MAC Algorithm field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _09_: _Invalid Padding Method field_\r\n    - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_ - Load Formatting Data to HSM\r\n\r\n### _PC (PD)_ - Load Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_ - Print PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n    - _16_: _Printer not ready/disconnected_\r\n    - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_ - Print TMK Mailer\r\n\r\n- _error codes (TB)_\r\n    - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n    - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output, or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n* `maskedKeys` must be set. It is array of items (fields) that will be masked. Item value should be taken from `messages.json` `requestPattern` for specific message. For instance if there is need to mask field `keySchemeLmk` in message `generateKey`, `maskedKeys` should have following struct. `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"c5b9a12c2cba80eaa24de229220a760427c5e5ab","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.13","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-V4UejGwO7Dinm4k8rc5Y77Y6Yryx88viRwjOsT0ZHpwYiz7uOuYFbBAMKF49CiG/rVL6I8U3+R+x2LPNPwdkug==","shasum":"d8e906bbac0f5a139040e2a3bc714cdacce83e6e","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.13.tgz","fileCount":160,"unpackedSize":2010718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUdMlCRA9TVsSAnZWagAA0w4P/jQDHhU8eO04blOywc2b\nLS57JySJ8yCawg9KAMQsgr8uDFIErT0nWjOLAAEsx/0dc4uXruAT1fdVFJE6\nQWw1phwmFnql+fe6YPU/LegdGQmaay1wru3AQQsofcxJPiyURybX0tiKcaxw\n1JaEHnk5rnjgOizDMk7sypsVB61iNxx9VcemI45ue56YFB+OgBuD8wKN69DX\n0aoyt8LvnEKtIzwHi88g0amFCEvU/0oQxzTK75DDmeoJQpPE2ODDJ56j7gZw\nNaGT6ztZje96Oayr8RFJF0CraBydy09TEyQnl2+7FUaFcsEBAnAy0bmcNZsE\n9cUI7+7VG7zcbCAq01eLJsUSSTEPhKDUFmDeICcWiOkQdo0ebFW9kOyjWBk3\nt43ePMfsVew1jwNpoZLyhjO5oLcT8pwSpQrTx07MG9CrefF/gCw4nhPrAvwz\n1uyaOgj5RHKJjAahtMhR/M72BsOWmScTHsPBh1FwZjtGYrmcUDgtE+SW9lPl\n1XjtSSfLPtKNBXe3YoetT+tRUYrGV8YKkP7S6J7twmxTY7MtYcvwembtPLOr\nXfoQ6yTGj+2MSAGeMB9YlI8dfISDrUxKjLka+HWkAAE/kp4D41p5V0gGxsK6\nupyzBVQrI2+Q1AsJHAV7BXoM0Dzjh+LT9aJCP3rw9FMv4xpmsduV8AuaBDjr\nP65+\r\n=gUYe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGJnDhmMuvr7ndQb6GFBFVU5c2wLvdFs2Fy4njzYpUWwIhAIjj1vBm10TqpOpToF0AcHhPUsu2oW9ZKAfRZsiNac+b"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.13_1548866340921_0.1375346692063304"},"_hasShrinkwrap":false},"7.0.0-rc-dss.14":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.14","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.1","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init (config) - initializes the _PayshieldCodec_ instance\r\n\r\n- **params**\r\n\r\n    - _config_ (object) - codec configuration\r\n        - _headerFormat_ (string) - defines the length and data type of the message header in format _length/data type_; **for more information of the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n        - _messageFormat_ (object) - may contain new command definitions, or definitions of existing commands to be overwritten, or parts of existing commands to be overwritten; **for more information of command definitions, please refer to _Payshield commands_ below**\r\n        - _maskedKeys_ (array) - request/response keys for which the values to be masked in the log records\r\n\r\n- **result** (void)\r\n\r\n### decode (buff, $meta, context, log) - decodes data buffer to JSON object\r\n\r\n- **params**\r\n\r\n    - _buff_ (buffer) - data buffer to be decoded\r\n    - _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n    - _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n    - _log_ (object) - contains log functions; **for more information, please refer to _ut-log_ documentation**\r\n\r\n- **result**\r\n\r\n    - (object) - decoded _buff_\r\n\r\n### encode (data, $meta, context, log) - encodes JSON object data to buffer\r\n\r\n- **params**\r\n\r\n    - _data_ (object) - data object to be encoded\r\n    - _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n    - _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n    - _log_ (object) - contains log functions; **for more information, please refer to _ut-log_ documentation**\r\n\r\n- **result**\r\n\r\n    - (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord (buffer, data, {pattern, maskedKeys, maskSymbol}) - replaces predefined data in log records\r\n\r\n- **params**\r\n\r\n    - _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n    - _data_ (object) - JSON object representing _buffer_\r\n    - _pattern_ (object) - _requestPattern_ of the command, as defined in _Payshield commands_ below\r\n    - _maskedKeys_ (array) - keys to be found in _data_ and their respective values to be replaced in _buffer_\r\n        - (string) - key for which the value to be masked\r\n    - _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\n- **result**\r\n\r\n    - (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in _payshield_ namespace\r\n    - _requestCode_ (string) - _Command Code_ for this command as defined in _Payshield Host Command Reference Manual_\r\n    - _responseCode_ (string) - _Response Code_ for this command as defined in _Payshield Host Command Reference Manual_\r\n    - _requestPattern_ (string) - request pattern definition for _PayshieldCodec_ _encode_ method; **for more information of pattern definitions, please refer to _ut-bitsyntax_ documentation**\r\n    - _responsePattern_ (string) - response pattern definition for _PayshieldCodec_ _decode_ method; **for more information of pattern definitions, please refer to _ut-bitsyntax_ documentation**\r\n    - _warnings_ (array) - array with error codes to be processed as warnings instead of errors **for this command only**; **for list of error codes, please refer to _Error codes_ below**\r\n        - (string) - error code to be processed as warning\r\n    - _customResponseError_ (object) - _key: value_ pairs object to define new error codes, or to overwrite existing standard error codes **for this command only**\r\n        - _key_ - error code\r\n        - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_ - Generate a Key\r\n\r\n- _error codes_\r\n    - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_ - Form a Key from Encrypted Components\r\n\r\n- _error codes_\r\n    - _03_: _Invalid number of components_\r\n    - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_ - Import a Key\r\n\r\n- _error codes_\r\n    - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n    - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_ - Export a Key\r\n\r\n- _error codes_\r\n    - _10_: _ZMK or TMK Parity error_\r\n    - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_ - Echo Command\r\n\r\n### _BK (BL)_ - Generate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n    - _03_: _Excluded PIN count incorrect_\r\n    - _10_: _TPK or ZPK parity error_\r\n    - _11_: _PVK parity error_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_ - Generate a Key Check Value\r\n\r\n- _error codes_\r\n    - _10_: _Key parity error_\r\n\r\n### _CA (CB)_ - Translate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n    - _10_: _Source TPK parity error_\r\n    - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_ - Translate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n    - _10_: _Source ZPK parity error_\r\n    - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_ - Verify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n    - _01_: _PIN Verification failure_\r\n    - _10_: _PIN Block Key parity error_\r\n    - _11_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_ - Generate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n    - _10_: _CVK A or CVK B parity error_\r\n    - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_ - Verify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n    - _01_: _CVV failed verification_\r\n    - _10_: _CVK A or B parity error_\r\n    - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_ - Verify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n    - _01_: _PIN Verification failure_\r\n    - _10_: _TPK parity error_\r\n    - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_ - Verify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n    - _01_: _PIN verification failure_\r\n    - _10_: _TPK parity error_\r\n    - _11_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_ - Generate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_ - Generate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_ - Verify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n    - _01_: _PIN verification failure_\r\n    - _10_: _ZPK parity error_\r\n    - _11_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_ - Derive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_ - Translate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_ - Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_ - Translate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n    - _10_: _BDK parity error_\r\n    - _11_: _Interchange key parity error_\r\n    - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_ - Hash a Block of Data\r\n\r\n- _error codes_\r\n    - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_ - Verify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n    - _01_: _PIN Verification failure_\r\n    - _10_: _BDK parity error_\r\n    - _11_: _PVK error_\r\n    - _27_: _BDK not double length_\r\n    - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_ - Generate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n    - _01_: _MAC Verification Failure_\r\n\r\n### _KQ (KR)_ - ARQC Verification and/or ARPC Generation (Using Static or MasterCard Proprietary SKD Method)\r\n\r\n- _error codes_\r\n    - _01_: _ARQC/TC/AAC verification failed_\r\n    - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n    - _04_: _Invalid Mode value_\r\n    - _05_: _Unrecognized Scheme ID_\r\n    - _06_: _Discretionary MAC verification failed_\r\n    - _10_: _MK-AC parity error_\r\n    - _11_: _MK-SMI parity error_\r\n    - _80_: _Transaction Data length error_\r\n    - _81_: _Zero length Transaction Data_\r\n    - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_ - ARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n    - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n    - _04_: _Unrecognized Mode Flag_\r\n    - _05_: _Unrecognized Scheme ID_\r\n    - _06_: _Invalid YHHHHCC value_\r\n    - _10_: _MK parity error_\r\n    - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_ - Encrypt Data Block\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid Output Format Flag field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _10_: _Encryption Key Parity Error_\r\n    - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_ - Decrypt Data Block\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid Output Format Flag field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _10_: _Decryption Key Parity Error_\r\n    - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_ - Translate Data Block\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid Output Format Flag field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Actual Message Length is too Short_\r\n    - _07_: _Invalid Destination Mode Flag Field_\r\n    - _08_: _Invalid destination Key Type Field_\r\n    - _10_: _Decryption Key Parity Error_\r\n    - _11_: _Encryption Key Parity Error_\r\n    - _15_: _Actual Message Length is too Long_\r\n    - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_ - Generate MAC\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid MAC Algorithm field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _09_: _Invalid Padding Method field_\r\n    - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_ - Verify MAC\r\n\r\n- _error codes_\r\n    - _01_: _MAC verification failed_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid MAC Algorithm field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _09_: _Invalid Padding Method field_\r\n    - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_ - Load Formatting Data to HSM\r\n\r\n### _PC (PD)_ - Load Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_ - Print PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n    - _16_: _Printer not ready/disconnected_\r\n    - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_ - Print TMK Mailer\r\n\r\n- _error codes (TB)_\r\n    - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n    - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output, or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n* `maskedKeys` must be set. It is array of items (fields) that will be masked. Item value should be taken from `messages.json` `requestPattern` for specific message. For instance if there is need to mask field `keySchemeLmk` in message `generateKey`, `maskedKeys` should have following struct. `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"b0ccfb86dbb00a634729ad83dc8cb41958d04cc8","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.14","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-JTx9WbLEGP+kvo2e0MRU6jnLn8u8YcWLsyY9gGNtM6Nj1bwfQKZ1RN2kr8PS7Uyw4AT/h5hK+DSMi0y0AJp8yQ==","shasum":"0cae0112dadc40a91fd72e3ba272ad96d5dc3423","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.14.tgz","fileCount":161,"unpackedSize":2042489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXCkoCRA9TVsSAnZWagAA1+EP/0hlTd5vd5bRLEFA4qvi\ndVnnjoKIPtBffhwN9YCZdlK+b4fs0tRlrtxUDdLmWauW1R48k/YEEvKDDDE0\nHsbc3L+5IXj4Ie46jg3p5zL7+Fg9TUD0QwC+9W09SCZfpXZEimAJqTNqtYmd\nFI5mUUQE6DYo0t488xUheHF5lW1MONLTzYGmI/s3xKsip2GXmv0vj9qJGfX0\nugaVXwkBdWCnPGbRJUOBwVyx4WsW0BmJtMOSx8T83Prt1gfrePCT+YTkIiib\nKroGynfytp1oO+9kiCwhO1DlzYtghIDanEtn+zyNvewJxXtSRoQvivB2yj7k\n/cgn04twN+B0z78SKsSJNXhiBIWy6KXBHUcPUPLRRIJKfdv3mx7QRXvhZ4MA\n4pjzDSg/aIShMBNc4gmFIDI3q1nDGezRtt/gUgjh2LfT9pXjaizX0DJsNTb3\nEos6ZvkuHypHeNcumvJ7o3P2dXbX+a+230smwb9sZVqZGFG++ShzbS8akS6n\nBK2rETLWKp2R0Y3vsaLkz8yvwv1Es/KRZHLadpOo+h2pdeahph+QrJGU68np\nJziqLNjnNnb2hNwdMjAuQSz+Jc76K19MS+TeB/S2QpDzffUNH9mdmw1KppMl\nE4eeLIA4P7N89t/yBwQBZ/tqXMY8Ww6g/RLbXnf4SC+5LFNp+s37Oe9mQj6V\ns+2E\r\n=nnFZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAG4n9/ZuJta01ODz2iVM4UDngGl08UeMWe5QFt7tU04AiAIP0eCk0eaUwNqjSfLYg+JAcLBTLWDSo4Whg3pds2RVg=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.14_1549543719007_0.38086263855416336"},"_hasShrinkwrap":false},"7.0.0-rc-dss.15":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.15","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.2","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init (config) - initializes the _PayshieldCodec_ instance\r\n\r\n- **params**\r\n\r\n    - _config_ (object) - codec configuration\r\n        - _headerFormat_ (string) - defines the length and data type of the message header in format _length/data type_; **for more information of the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n        - _messageFormat_ (object) - may contain new command definitions, or definitions of existing commands to be overwritten, or parts of existing commands to be overwritten; **for more information of command definitions, please refer to _Payshield commands_ below**\r\n        - _maskedKeys_ (array) - request/response keys for which the values to be masked in the log records\r\n\r\n- **result** (void)\r\n\r\n### decode (buff, $meta, context, log) - decodes data buffer to JSON object\r\n\r\n- **params**\r\n\r\n    - _buff_ (buffer) - data buffer to be decoded\r\n    - _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n    - _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n    - _log_ (object) - contains log functions; **for more information, please refer to _ut-log_ documentation**\r\n\r\n- **result**\r\n\r\n    - (object) - decoded _buff_\r\n\r\n### encode (data, $meta, context, log) - encodes JSON object data to buffer\r\n\r\n- **params**\r\n\r\n    - _data_ (object) - data object to be encoded\r\n    - _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n    - _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n    - _log_ (object) - contains log functions; **for more information, please refer to _ut-log_ documentation**\r\n\r\n- **result**\r\n\r\n    - (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord (buffer, data, {pattern, maskedKeys, maskSymbol}) - replaces predefined data in log records\r\n\r\n- **params**\r\n\r\n    - _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n    - _data_ (object) - JSON object representing _buffer_\r\n    - _pattern_ (object) - _requestPattern_ of the command, as defined in _Payshield commands_ below\r\n    - _maskedKeys_ (array) - keys to be found in _data_ and their respective values to be replaced in _buffer_\r\n        - (string) - key for which the value to be masked\r\n    - _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\n- **result**\r\n\r\n    - (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in _payshield_ namespace\r\n    - _requestCode_ (string) - _Command Code_ for this command as defined in _Payshield Host Command Reference Manual_\r\n    - _responseCode_ (string) - _Response Code_ for this command as defined in _Payshield Host Command Reference Manual_\r\n    - _requestPattern_ (string) - request pattern definition for _PayshieldCodec_ _encode_ method; **for more information of pattern definitions, please refer to _ut-bitsyntax_ documentation**\r\n    - _responsePattern_ (string) - response pattern definition for _PayshieldCodec_ _decode_ method; **for more information of pattern definitions, please refer to _ut-bitsyntax_ documentation**\r\n    - _warnings_ (array) - array with error codes to be processed as warnings instead of errors **for this command only**; **for list of error codes, please refer to _Error codes_ below**\r\n        - (string) - error code to be processed as warning\r\n    - _customResponseError_ (object) - _key: value_ pairs object to define new error codes, or to overwrite existing standard error codes **for this command only**\r\n        - _key_ - error code\r\n        - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_ - Generate a Key\r\n\r\n- _error codes_\r\n    - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_ - Form a Key from Encrypted Components\r\n\r\n- _error codes_\r\n    - _03_: _Invalid number of components_\r\n    - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_ - Import a Key\r\n\r\n- _error codes_\r\n    - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n    - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_ - Export a Key\r\n\r\n- _error codes_\r\n    - _10_: _ZMK or TMK Parity error_\r\n    - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_ - Echo Command\r\n\r\n### _BK (BL)_ - Generate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n    - _03_: _Excluded PIN count incorrect_\r\n    - _10_: _TPK or ZPK parity error_\r\n    - _11_: _PVK parity error_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_ - Generate a Key Check Value\r\n\r\n- _error codes_\r\n    - _10_: _Key parity error_\r\n\r\n### _CA (CB)_ - Translate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n    - _10_: _Source TPK parity error_\r\n    - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_ - Translate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n    - _10_: _Source ZPK parity error_\r\n    - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_ - Verify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n    - _01_: _PIN Verification failure_\r\n    - _10_: _PIN Block Key parity error_\r\n    - _11_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_ - Generate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n    - _10_: _CVK A or CVK B parity error_\r\n    - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_ - Verify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n    - _01_: _CVV failed verification_\r\n    - _10_: _CVK A or B parity error_\r\n    - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_ - Verify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n    - _01_: _PIN Verification failure_\r\n    - _10_: _TPK parity error_\r\n    - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_ - Verify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n    - _01_: _PIN verification failure_\r\n    - _10_: _TPK parity error_\r\n    - _11_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_ - Generate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_ - Generate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_ - Verify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n    - _01_: _PIN verification failure_\r\n    - _10_: _ZPK parity error_\r\n    - _11_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_ - Derive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_ - Translate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_ - Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_ - Translate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n    - _10_: _BDK parity error_\r\n    - _11_: _Interchange key parity error_\r\n    - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_ - Hash a Block of Data\r\n\r\n- _error codes_\r\n    - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_ - Verify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n    - _01_: _PIN Verification failure_\r\n    - _10_: _BDK parity error_\r\n    - _11_: _PVK error_\r\n    - _27_: _BDK not double length_\r\n    - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_ - Generate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n    - _01_: _MAC Verification Failure_\r\n\r\n### _KQ (KR)_ - ARQC Verification and/or ARPC Generation (Using Static or MasterCard Proprietary SKD Method)\r\n\r\n- _error codes_\r\n    - _01_: _ARQC/TC/AAC verification failed_\r\n    - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n    - _04_: _Invalid Mode value_\r\n    - _05_: _Unrecognized Scheme ID_\r\n    - _06_: _Discretionary MAC verification failed_\r\n    - _10_: _MK-AC parity error_\r\n    - _11_: _MK-SMI parity error_\r\n    - _80_: _Transaction Data length error_\r\n    - _81_: _Zero length Transaction Data_\r\n    - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_ - ARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n    - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n    - _04_: _Unrecognized Mode Flag_\r\n    - _05_: _Unrecognized Scheme ID_\r\n    - _06_: _Invalid YHHHHCC value_\r\n    - _10_: _MK parity error_\r\n    - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_ - Encrypt Data Block\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid Output Format Flag field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _10_: _Encryption Key Parity Error_\r\n    - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_ - Decrypt Data Block\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid Output Format Flag field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _10_: _Decryption Key Parity Error_\r\n    - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_ - Translate Data Block\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid Output Format Flag field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Actual Message Length is too Short_\r\n    - _07_: _Invalid Destination Mode Flag Field_\r\n    - _08_: _Invalid destination Key Type Field_\r\n    - _10_: _Decryption Key Parity Error_\r\n    - _11_: _Encryption Key Parity Error_\r\n    - _15_: _Actual Message Length is too Long_\r\n    - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_ - Generate MAC\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid MAC Algorithm field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _09_: _Invalid Padding Method field_\r\n    - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_ - Verify MAC\r\n\r\n- _error codes_\r\n    - _01_: _MAC verification failed_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid MAC Algorithm field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _09_: _Invalid Padding Method field_\r\n    - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_ - Load Formatting Data to HSM\r\n\r\n### _PC (PD)_ - Load Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_ - Print PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n    - _16_: _Printer not ready/disconnected_\r\n    - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_ - Print TMK Mailer\r\n\r\n- _error codes (TB)_\r\n    - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n    - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output, or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n* `maskedKeys` must be set. It is array of items (fields) that will be masked. Item value should be taken from `messages.json` `requestPattern` for specific message. For instance if there is need to mask field `keySchemeLmk` in message `generateKey`, `maskedKeys` should have following struct. `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"6c40061ab9aa75e135d5f22de260056727967de8","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.15","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-opAJVSNVK9XGIsN7MpQsfFT2cTYfGjs/WpGxB3CSmateunXiOIsVMgNy+boGEuNW8u7nLiunoNhPr2U6rOckrw==","shasum":"b421fd869d90fd0ddf22f6484697b8c0ab4d951c","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.15.tgz","fileCount":163,"unpackedSize":2080790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYk3pCRA9TVsSAnZWagAAKi0QAKEf9XgpmSglWsXkUnYJ\nTHpMhstfD2YAWbxy92Ry8jrlayzlxNelLXwkl0m9qJWVPYZbaEq3x03ReV4Y\nWbmMcNP6dRK50/t64u5ABSiqrgSbs+rnu/ZYhPpuZ2reqnYkoz/EEGd7x18M\npAzR09T6/N0qTkQnZnFNlw8SARVbatPCEzB973XQYBcRxUVrlcEWaKXRpamq\n9jAw2DgeHWEc1RKA6xmUFQwMxNMm9HM3GINRbbZTYCdwiTqpDWTogmEbjSp/\nKVRbVC4peZyBEi/Yb10IbfWgjVh7ncQyDVVbnYKfLE12+OM8KeHfke6Bz6Tk\nhr2Af+VXllauUHRZu6vH7Ek2JDdawLw1phgutkm9kl6mA38k9/EOiv6WUohn\n7iD1P/SYtlrDTxc8qYQNBW3/ryB7Pe/v+i1OJrtGuVDbWAsdFhnMOLSUdQwj\nhu7SMUE77rqcX/SCQ0PJD8EeGZ4vXq/KiirxctIaQWLMIT/75H4vS22I0fcz\nCdlI1UlkhqBoE1EI6laH8q6vhlYEVttW11iQ/nLkxO6GT7qc9TE4j986g//3\neiAwPHkoLYsXYqX8NK09kkIMYYXxFLYgfIThCOeheiHZ0pdU3TAV6YllYY/d\nbMQ/yhWx/XVYYcfJ4M7k4pI2XcLW7a7htBdlncLXghiKqTcmNLpyEXXydLfX\niIxS\r\n=gIRx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxiEXJ3uayhVgqk8HyNYGD3LODXE/5qLheaydGuxyWbQIhAPRtumvmA9yJtwX15IsAqHx6fGcUyyfcC3Bqf/0TZ0e6"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.15_1549946345144_0.7485218893864687"},"_hasShrinkwrap":false},"7.0.0-rc-dss.16":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.16","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.2","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init (config) - initializes the _PayshieldCodec_ instance\r\n\r\n- **params**\r\n\r\n    - _config_ (object) - codec configuration\r\n        - _headerFormat_ (string) - defines the length and data type of the message header in format _length/data type_; **for more information of the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n        - _messageFormat_ (object) - may contain new command definitions, or definitions of existing commands to be overwritten, or parts of existing commands to be overwritten; **for more information of command definitions, please refer to _Payshield commands_ below**\r\n        - _maskedKeys_ (array) - request/response keys for which the values to be masked in the log records\r\n\r\n- **result** (void)\r\n\r\n### decode (buff, $meta, context, log) - decodes data buffer to JSON object\r\n\r\n- **params**\r\n\r\n    - _buff_ (buffer) - data buffer to be decoded\r\n    - _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n    - _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n    - _log_ (object) - contains log functions; **for more information, please refer to _ut-log_ documentation**\r\n\r\n- **result**\r\n\r\n    - (object) - decoded _buff_\r\n\r\n### encode (data, $meta, context, log) - encodes JSON object data to buffer\r\n\r\n- **params**\r\n\r\n    - _data_ (object) - data object to be encoded\r\n    - _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n    - _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n    - _log_ (object) - contains log functions; **for more information, please refer to _ut-log_ documentation**\r\n\r\n- **result**\r\n\r\n    - (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord (buffer, data, {pattern, maskedKeys, maskSymbol}) - replaces predefined data in log records\r\n\r\n- **params**\r\n\r\n    - _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n    - _data_ (object) - JSON object representing _buffer_\r\n    - _pattern_ (object) - _requestPattern_ of the command, as defined in _Payshield commands_ below\r\n    - _maskedKeys_ (array) - keys to be found in _data_ and their respective values to be replaced in _buffer_\r\n        - (string) - key for which the value to be masked\r\n    - _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\n- **result**\r\n\r\n    - (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in _payshield_ namespace\r\n    - _requestCode_ (string) - _Command Code_ for this command as defined in _Payshield Host Command Reference Manual_\r\n    - _responseCode_ (string) - _Response Code_ for this command as defined in _Payshield Host Command Reference Manual_\r\n    - _requestPattern_ (string) - request pattern definition for _PayshieldCodec_ _encode_ method; **for more information of pattern definitions, please refer to _ut-bitsyntax_ documentation**\r\n    - _responsePattern_ (string) - response pattern definition for _PayshieldCodec_ _decode_ method; **for more information of pattern definitions, please refer to _ut-bitsyntax_ documentation**\r\n    - _warnings_ (array) - array with error codes to be processed as warnings instead of errors **for this command only**; **for list of error codes, please refer to _Error codes_ below**\r\n        - (string) - error code to be processed as warning\r\n    - _customResponseError_ (object) - _key: value_ pairs object to define new error codes, or to overwrite existing standard error codes **for this command only**\r\n        - _key_ - error code\r\n        - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_ - Generate a Key\r\n\r\n- _error codes_\r\n    - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_ - Form a Key from Encrypted Components\r\n\r\n- _error codes_\r\n    - _03_: _Invalid number of components_\r\n    - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_ - Import a Key\r\n\r\n- _error codes_\r\n    - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n    - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_ - Export a Key\r\n\r\n- _error codes_\r\n    - _10_: _ZMK or TMK Parity error_\r\n    - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_ - Echo Command\r\n\r\n### _BK (BL)_ - Generate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n    - _03_: _Excluded PIN count incorrect_\r\n    - _10_: _TPK or ZPK parity error_\r\n    - _11_: _PVK parity error_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_ - Generate a Key Check Value\r\n\r\n- _error codes_\r\n    - _10_: _Key parity error_\r\n\r\n### _CA (CB)_ - Translate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n    - _10_: _Source TPK parity error_\r\n    - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_ - Translate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n    - _10_: _Source ZPK parity error_\r\n    - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_ - Verify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n    - _01_: _PIN Verification failure_\r\n    - _10_: _PIN Block Key parity error_\r\n    - _11_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_ - Generate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n    - _10_: _CVK A or CVK B parity error_\r\n    - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_ - Verify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n    - _01_: _CVV failed verification_\r\n    - _10_: _CVK A or B parity error_\r\n    - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_ - Verify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n    - _01_: _PIN Verification failure_\r\n    - _10_: _TPK parity error_\r\n    - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_ - Verify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n    - _01_: _PIN verification failure_\r\n    - _10_: _TPK parity error_\r\n    - _11_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_ - Generate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_ - Generate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_ - Verify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n    - _01_: _PIN verification failure_\r\n    - _10_: _ZPK parity error_\r\n    - _11_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_ - Derive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_ - Translate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_ - Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n    - _10_: _PVK parity error_\r\n    - _27_: _PVK not double length_\r\n    - _81_: _PIN length mismatch_\r\n    - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_ - Translate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n    - _10_: _BDK parity error_\r\n    - _11_: _Interchange key parity error_\r\n    - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_ - Hash a Block of Data\r\n\r\n- _error codes_\r\n    - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_ - Verify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n    - _01_: _PIN Verification failure_\r\n    - _10_: _BDK parity error_\r\n    - _11_: _PVK error_\r\n    - _27_: _BDK not double length_\r\n    - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n    - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_ - Generate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n    - _01_: _MAC Verification Failure_\r\n\r\n### _KQ (KR)_ - ARQC Verification and/or ARPC Generation (Using Static or MasterCard Proprietary SKD Method)\r\n\r\n- _error codes_\r\n    - _01_: _ARQC/TC/AAC verification failed_\r\n    - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n    - _04_: _Invalid Mode value_\r\n    - _05_: _Unrecognized Scheme ID_\r\n    - _06_: _Discretionary MAC verification failed_\r\n    - _10_: _MK-AC parity error_\r\n    - _11_: _MK-SMI parity error_\r\n    - _80_: _Transaction Data length error_\r\n    - _81_: _Zero length Transaction Data_\r\n    - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_ - ARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n    - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n    - _04_: _Unrecognized Mode Flag_\r\n    - _05_: _Unrecognized Scheme ID_\r\n    - _06_: _Invalid YHHHHCC value_\r\n    - _10_: _MK parity error_\r\n    - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_ - Encrypt Data Block\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid Output Format Flag field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _10_: _Encryption Key Parity Error_\r\n    - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_ - Decrypt Data Block\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid Output Format Flag field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _10_: _Decryption Key Parity Error_\r\n    - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_ - Translate Data Block\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid Output Format Flag field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Actual Message Length is too Short_\r\n    - _07_: _Invalid Destination Mode Flag Field_\r\n    - _08_: _Invalid destination Key Type Field_\r\n    - _10_: _Decryption Key Parity Error_\r\n    - _11_: _Encryption Key Parity Error_\r\n    - _15_: _Actual Message Length is too Long_\r\n    - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_ - Generate MAC\r\n\r\n- _error codes_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid MAC Algorithm field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _09_: _Invalid Padding Method field_\r\n    - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_ - Verify MAC\r\n\r\n- _error codes_\r\n    - _01_: _MAC verification failed_\r\n    - _02_: _Invalid Mode Flag field_\r\n    - _03_: _Invalid Input Format Flag field_\r\n    - _04_: _Invalid MAC Algorithm field_\r\n    - _05_: _Invalid Key Type field_\r\n    - _06_: _Invalid Message Length field_\r\n    - _09_: _Invalid Padding Method field_\r\n    - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_ - Load Formatting Data to HSM\r\n\r\n### _PC (PD)_ - Load Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_ - Print PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n    - _16_: _Printer not ready/disconnected_\r\n    - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_ - Print TMK Mailer\r\n\r\n- _error codes (TB)_\r\n    - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n    - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output, or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n* `maskedKeys` must be set. It is array of items (fields) that will be masked. Item value should be taken from `messages.json` `requestPattern` for specific message. For instance if there is need to mask field `keySchemeLmk` in message `generateKey`, `maskedKeys` should have following struct. `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"23023774260a9e3d342d00221189a19ae1222ae4","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.16","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-C4CTgXQtxZNFSagWRuZneq44sWqWj1Q+VZGVTj51K3UGTulVeUp82XWk26g61+3x21DcQ864b+gmkflrZCY3WQ==","shasum":"d45f05be89b084bc42bcf17b4d70f114de0d098b","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.16.tgz","fileCount":163,"unpackedSize":2080779,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYsp0CRA9TVsSAnZWagAA06wP/3AVE5dL6homwONos0sL\n5CDKI2h34v2yJHWRAJilHltHegy3X15Eol8UPIktBHJpipNFKtBQLriXQaNN\nB7ZT78doPAe3wQddGgZJ8M0BMvgtqaqw32ujMpE11JolxIDXbyLREBvad3zn\nM7cuIvUV8PfumpKdsn/Fb7BNJsnr7mDx7iWlGOGr6eAF1GYI53VRTCg9Uv2R\nE7Ue8V5QS5Y5/1FTDrle0NZhF8n1v/OXGwieR7UgKw/76/kBH1HXebsSwi10\noVcEurB/M1iU9akN9B+Q391o3wTMcvvjtQwtiAcNSTnU37e/SYo18eV2Y90k\n0vcyg9ZZ5JR86G6Hnw/usgrX9bL2k4kXZGql3wZMOUi+amxZdpH70JvdriHc\nilN8QXIjqlAd2WuVtmkbMvsXBsYgXHAphMOC9m1G5RS06eNW3PXC4rgeuC9v\naHdEem9U+CVtBFfxMnh6JpgYqQEiZkRxooKyar5mtGr/7toN4/PH7fpDbEzz\nSfPCK3frNlNMuUKbn2SPJOjKO5wslkSxwiclXXhyGDY3Ge45R8Ypi5y+pfkH\nqmTME8PVU7z6afvnv/kjSLQqB1Y4HtrW4oWrYCLv20PzGrzQZ5zjX3pkV8DR\n1HGypVjSi11APvq4NG1v92PBqvcqM+ffwKEvnhYIIs4rgs+GGurca+dTDnvo\nnsop\r\n=H4RX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFTjjo+8+wg+lbPf1RRf+vn3d/ebppTJPjcTRdExpRWJAiBq2AhnaTzNJkhWCXYJziQXYKsJbYlgo9B79ITjdKlctw=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.16_1549978227693_0.7764991840634639"},"_hasShrinkwrap":false},"7.0.0-rc-dss.17":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.17","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.2","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init (config) - initializes the _PayshieldCodec_ instance\r\n\r\n- **params**\r\n\r\n  - _config_ (object) - codec configuration\r\n    - _headerFormat_ (string) - defines the length and data type of the\r\n      message header in format _length/data type_; **for more information of\r\n      the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n    - _messageFormat_ (object) - may contain new command definitions, or\r\n      definitions of existing commands to be overwritten, or parts of\r\n      existing commands to be overwritten; **for more information of command\r\n      definitions, please refer to _Payshield commands_ below**\r\n    - _maskedKeys_ (array) - request/response keys for which the values to\r\n      be masked in the log records\r\n\r\n- **result** (void)\r\n\r\n### decode (buff, $meta, context, log) - decodes data buffer to JSON object\r\n\r\n- **params**\r\n\r\n  - _buff_ (buffer) - data buffer to be decoded\r\n  - _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n  - _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n  - _log_ (object) - contains log functions; **for more information, please\r\n    refer to _ut-log_ documentation**\r\n\r\n- **result**\r\n\r\n  - (object) - decoded _buff_\r\n\r\n### encode (data, $meta, context, log) - encodes JSON object data to buffer\r\n\r\n- **params**\r\n\r\n  - _data_ (object) - data object to be encoded\r\n  - _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n  - _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n  - _log_ (object) - contains log functions; **for more information, please\r\n    refer to _ut-log_ documentation**\r\n\r\n- **result**\r\n\r\n  - (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord (buffer, data, {pattern, maskedKeys, maskSymbol}) - replaces predefined data in log records\r\n\r\n- **params**\r\n\r\n  - _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n  - _data_ (object) - JSON object representing _buffer_\r\n  - _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n    _Payshield commands_ below\r\n  - _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n    values to be replaced in _buffer_\r\n    - (string) - key for which the value to be masked\r\n  - _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\n- **result**\r\n\r\n  - (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_ - Generate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_ - Form a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_ - Import a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_ - Export a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_ - Echo Command\r\n\r\n### _BK (BL)_ - Generate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_ - Generate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _CA (CB)_ - Translate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_ - Translate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_ - Verify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_ - Generate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_ - Verify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_ - Verify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_ - Verify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_ - Generate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_ - Generate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_ - Verify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_ - Derive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_ - Translate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_ - Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_ - Translate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_ - Hash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_ - Verify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_ - Generate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _KQ (KR)_ - ARQC Verification and/or ARPC Generation (Using Static or MasterCard Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_ - ARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_ - Encrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_ - Decrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_ - Translate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_ - Generate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_ - Verify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_ - Load Formatting Data to HSM\r\n\r\n### _PC (PD)_ - Load Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_ - Print PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_ - Print TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"69d5cabdbb40495b0a9c98ac4691a5d31829b477","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.17","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-5bY8HyRGP4+gpo9zDuvsA5AVKMfDdYKP9vCeDu7AEmjGxEA2hWhIofWXoVKBdFFPdxeCPac0Ce1LjEqBAP/lQg==","shasum":"0e2332e8528de8fbd945b67bca28a34eef24ecc9","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.17.tgz","fileCount":163,"unpackedSize":2071898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZTvRCRA9TVsSAnZWagAAMTUP/R309Ht33BFdu6XuRf2a\nwDMh9WWhP4MuZDFWlvAaoZR72D0wCVL0qPZ2E7rpDl4MTa7glskAnQaVxVwJ\nHve0iuzRe/3lk9Pky0HfNG29eQzw7MFTa1XaARBQzO7gMyvc0Q+rScUcwIbu\nWVav1OuVVZ2yn0EPMoTc1cKoFQJDveiQFlZJjE7jCNnDXjxqKkHkEFanRjjX\ntrS2k41HTQsdTcMZvoCqaOGJfZ1DlkO7wRO4HwNRT2283CJRR/8w8Fk0eV7w\njUxeD+YMOp6SqpOeqGw/6GvX70ZWmqhIkZyL97vB9yta9lKWxS59Z7bFt70O\nKIME72bMchY5KiAfos9RtBirJ28mquO754h9DD8coFLfIUCJMJZ6MLUQ0E17\nLvs/q/iB3AaxJSYhbhm7GIxkV5O3dtDrVcDYnjuau4QAdchnoUUrr5yc+Xyv\nwW+p9SGoYGPXpSbjPb8ixDw/L45Qv8eVtDfrawj1gcVOnLGyz7/6yHoPk558\n/CS2eS51+I9togiLha+aCDtTRM+ZBzsqS+/9fbmfTywjDZTeht9f2VPSNzEq\ncXS8mh8FBTsZWju5slfpSiEiMyd1ivrIvbkTHzq//4d7NYNBF4d+u+ReRBeK\nRHVKbXzNBqllqWOVHS6KJwdfEJUKXPGv8r0k2j6UkgXQdjI5LUnLpWC+EgaF\nwi/x\r\n=m+zq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBknV/WOmR3p+TND02d3PSbepkVPNYq5kkw6OeyMNnhHAiEAmjN3nFwBHrJY6Zr6Lzf01H1bZx+yhkh8p3ze0YOCA0A="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.17_1550138320553_0.4828783532154335"},"_hasShrinkwrap":false},"7.0.0-rc-dss.18":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.18","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.2","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"9a9d14d992ee1f1b77e365b3a84e2eceee42d129","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.18","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-1C2Fwvo494QGPkMpZMgwERQxBNnaa45S3hcwWXbm93HmIwzemmKi4WLfkl+0VdJYsYCEA6bDAKyXjkRIvw/qeQ==","shasum":"2ca4ca373e1806cedba446a75984b9825dbe73f7","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.18.tgz","fileCount":163,"unpackedSize":2071860,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcap6QCRA9TVsSAnZWagAAynkP/1hFaRpwl/TJHaRgHVMu\n6o0tjVh+wJN4EyR0of/3JoHWCZdPUK/jsA6oO7DTcA85iIz8fwWqAkQP2L8t\n1rIktZnFYksdw5MxvKthzLaTpMALEN1yuh0iQr+ymOxKNP9YacC1gm8DJR2A\nhyflmWjNVhIshYYdc7f3j+9M+QwiPQjOje8K+D40HsdY/H+Ye5Dqrjf78b9k\nxBqmI25veMojiG4g9tFXl3vGIH7VjVxctIkZhEquWtN71+vwFTo6fCVbKoLo\nxeNKTo3IhMb3rc9vMl0M9q/5S2bnRQilqtQZ9Eoq7xxG76Xv4WrsC5Bd+mnO\nhhbJ5XuvgJxUrtBmQlPvSCiVVH2GJRFDlh+JZN9h+ggm1gbU3ZZZcRxQIhJu\n3oY9pdy0KFJj0aeK4PwtAwMY568Xx9s5dqmTe9pXKHWTCrJIVk3KHD+Audb4\nnp3lnVEml3lGscdplSQlJ+4K1ClwZoC29+6osO7A02ZtW3pIaII05QE91kP5\n5F7E7M6l1HYcNA7HyDousezSzdM8x3Um9gfE6/OfIjXHENEo/cau6FK0a9eP\nuKXntW1skmTwxmstgo5SgF6+R1bw+1WQG7Nd/aJnfyL+UPqi33XOB54RZRbC\ngJyzjdWBYhSmzXDHkHNVJ0eTxH3MUqSbqWyarWfJSj90R94YC8MZSFW54qah\nnXbl\r\n=kBz5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH6iXkYy9emZ/y9Auciqc9CcfAwFRI0NxmQ/yIddHqbjAiEA3ujGpBtJcsEzbSXKCHFglsXZYO/1JsQJ6Aaehar7Upk="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.18_1550491280106_0.1537253086824173"},"_hasShrinkwrap":false},"7.0.0-rc-dss.19":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.19","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"d1f3bd1098be9713b67d943b9a6de2edb01c9535","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.19","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-7F+Q7iPrtvn5Dy63UR9tfGGazhgfC4SCzFImVGuFSdLJ7001eQnqWtGywByr25UwSgv/TX3YGKg64jf8eJB8SQ==","shasum":"a16e31b1b2c3010c0fb3058b3dcd3b9d9f7cb6be","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.19.tgz","fileCount":175,"unpackedSize":2240432,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbmhXCRA9TVsSAnZWagAAJMoP/jIgdnZ9/iYaLq9qhuEt\nv58s9YS1ToK+H78yK6NIlzWZGGtOZRXOfwqo+umgo/cmzW2Oo1lO/8fmYjU2\n+u+jMnGOsstEFgbc04tjXq/w8TTomYiGNenoLinwz85qltnA1RBVnP8FhxE7\nI/1bdlutDepQxba+y4KpvkDXK42j6Ey6z3uaqtlV37CzRBOygzOx4R5DMwkj\nERq0v4Z3+6OKeyvydOPtwK5xk0ZhV1ooqBgyAM6xUPrBroyOBPafT+rEawN4\n0FlrgWKuqxFHdwfV16WUFpFGBO0Z/steCs2M0JIArOShojVA8V+8lbwPzWeU\nDW8A4GbEhEZ91ZakXiqUJ4Q/oOEBjNHLHFkK4VHgLGOcAi4FF57YvXKW7/Pn\nYc8wVsbumelFaXCc9Mc5dSUfCXB3hcdZ1/IL5Iy+tjlc1T7qH/CtdsJSraeB\nNd/5q9vacZ/Q9YWrHO3lhcIkEEo6T8tHY94JXn4GoBaCLAC53iFmxT2UGvxR\nSnlqk8YZix5CgH/H4A1ZA5VyaavdojlB2Ov7gD2QYtU7P5wlJuFAWGTxoItz\nLzi8FV8sHW6U/I+7s00iqv63ulJTkaG5/gRsNotBduQQXn/FAhIiskow7+Te\n/l6yU14PTkJZUWfR7j7/ASsfGejZ0JeSM01yOrhukK0FnoEa7IMTDSsa/8Sh\nu4Mw\r\n=srl0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRbvV0u7heqDT9t3XuuYamTmcCYpFVWxuoPHdLHUIPNAIgdpkGUXXRId9uIRybLFdAH76PZeYWGSUapy4Ed8f9n20="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.19_1550739543338_0.527232351100805"},"_hasShrinkwrap":false},"7.0.0-rc-dss.20":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.20","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"0d3c1ca5d8046210f337ca12e0c64fe89c3c0133","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.20","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-T1e5TPtgBmCrg1ZJqjzbeqwVvbDEWLSwFlL9F5qqr4C7sXgUFtKdXiKEa0GRgLNQFLzM+yJvoKqS/Eoe6X0PxA==","shasum":"da50b31c149ec46f5b38d9e33c6846a4897e4a5e","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.20.tgz","fileCount":175,"unpackedSize":2240323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbo3ZCRA9TVsSAnZWagAAZfcP/RrEtCf4K8bzOPdd2ePu\ndkdaWcUECKiu5wcX4zlADlMiOYGKdBf+l53FFHWWnIh7Z+701z9xiqMSHIvw\nhBUkhuQz3stJFtnch+b0/piQgEAmk/v2qmPW77ppYUG4zvOV1VHWeAqGP3ki\nBdGHXEUc9F05G7HVE2U5tHiBWaW1IfYLb0o68CZmdrFnaUyeBoeiOGD3j/Wk\nWmxfFiI9UbqVAt6EJE693dsSXrLstCEMP+ZJ6Dw8+ko0gg6EoF/Q7v2R9Pn9\nGlo5baf97w3OD+KpLDPJgHYp/w5Px/RDjZifsgUenSi2ji2dH/dCAluwCrlq\nOI8tqVhVQlcGKgCh8R8ePl+gBXOtYcDETkjHbSnD2uRWEfYFAh2i1/lstLE1\nyTe+j4rd3kr+PWhk7nC+QqBHM8JJ1GVMAN1NQcmJxojByFmQJ4e4f7S/B/K4\ngysenFjOoreyCS6ffosGxcn3UB00pDFRJThaKAQXwxtEQJxw4OjYhTibbOKK\nK9+wna9i6zZFoUxJ51P3ymvEuMjU6qpTC8RFQ5L60m6Oc4BFw6R905MAZtN4\nQKNtZAaJ0kAfEzXzk/xkDFYaFOyusUGUgzamIlGrfz3iQQ1pCiC40q75VXzO\nhmHGKE6Z+dWDHuZ3kHdJDlYZJStb4aaq10TmH/W/2VLpRuoizwdyS/6JCoyP\nIifm\r\n=/S//\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlCtSuCV2w8yd9Iq+dovB2MX1K0Mn3mN6UwyWR6fsqIQIhAKH11iAo3rshTk0g9M7IZ1dCncst1xpwJj0Yr98ntOv+"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.20_1550749144739_0.6354727909372366"},"_hasShrinkwrap":false},"7.0.0-rc-dss.21":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.21","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"2f84c16f4be3b1107c5571c0e318f05e9351389b","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.21","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-RLCDF/sBPO8+4QYABLJBkg86x7pcnLVQM2yU6REvOLM+9Tms/tqjMlO9ZuUCO/K9iDJX/BBZ+xXDiEdgnsGDGQ==","shasum":"03c0c70aec345f5c0bcb460df1d8b58a1262b358","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.21.tgz","fileCount":174,"unpackedSize":2217856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdT8MCRA9TVsSAnZWagAADNwP/RGrqmZjY442qZzFDcz8\ntnVuhaK1S/DUA5aIv3lP410Q2pc+RR4q1oMJxoqakkyyXbMntR5j8SNYlEcQ\nmLG/TFIunTmzfwydbgMEUYYmH7ehGRpuaKtQMva5DfeKqNsSNk7+3Xghq0G9\nU16hf+ql6pUtpRMMkt+JtLG6pLk2Nvx376+dk0+tgaKh6uzpLbQx/CX7EDuH\nTrKvbWBYl4NqKmJjQQ8Cf9rjs0vY7ktBD9d58rmovleS4rF9synspLiEIof/\nwwJhAY2AmbBcf7BM4uk5qzes1JMhi+la6JSBDd9mWw2yjJLSlRl4k31omVFP\nKpWaZzxePhe4hvhnw+amrFYfOE3Otq88Vy71R36cKzVKGx+vKUPSjoAHv4Gs\nq00PBTcsnjLSymgh7eCPhXAbMRoM4BtFExBWHdDP57a4LDRGsO9Xj31is5ML\n6g2z7IFXi60datnQG+aFF2fjsXa3QDk/u8TinTj1lUFbB2OKdzEUridvWByT\nHB7Kac70jtfz0TIosZEcswrZKxT7pC56iRUfOUuNhFU3bKchTWB5Z6yq5g+a\njGCRfgqcz0/LmrtXrzsQ1jeiq+LX/2pu1L16ULMHJGhJGy8TQuPpONM+7zMM\ndfs4V3SW9YGahumYzMpcUKf/klU3gy7r8kfPbGnDKkZyhSA61lTN17W+9VZO\ntE4E\r\n=oS9k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF0SIU0adfKdHC4Sty+m5v618UlEhqSEwm/ITyNAe8svAiA+jI21ZkS802XwPEF42FtwCJYBauhPKLIh+CX7rHpRAQ=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.21_1551187724084_0.908002266371635"},"_hasShrinkwrap":false},"7.0.0-rc-dss.22":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.22","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"956027ba0871ca05bdc2a90967a60404c9829621","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.22","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-9statd2z14quea5cpUn91uNtjuftBxel8ClH+6wClLuPamTbyjnDzYnrEznZqdLUPxGyS42oNqJCaITMKRBlJg==","shasum":"7d8c275e7daad6acc509e716198753d020b23fe9","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.22.tgz","fileCount":174,"unpackedSize":2217973,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgOj6CRA9TVsSAnZWagAAEuQP/RYRj6kTyFbdkpw8isnc\nBDgFEq1TpE+G34rArMxZUQwVTll9cjD41YK7gqa0Q5s8AqXhpbBpdGXEgHuo\nCurAqSdy69iTEcV8PJE4HdOmtlr8Sn+6CX5nRgTgCcwALDG2eUWsnNthu3wX\nkGbOqZ4jZGS/A3hUbETmaZSEJx8ME6lh+Y920uVwto2lOz4OkGzhAUkdzSlg\nbi9ie/mnP6SGY05ne1Jdl/IJiYjj2aq181yzI1QqmENUEB83SXvF9+LArMjf\n+ZkIbs0Ofiryg8Mbua7Sy3wl34/yeKUk3DhmLaAGGlPJ3laU+aiv1Q+aif3A\nHFUbjx66ujBB3x9Pb4n8vbkDhUDTluAsUHYglVvFrQH7d1/RdS+wBVCskOI9\nZgzxPyRkc2bzv60dpaMx+dQIokoWgf7l7Dla+96vyAT/BJgU1LjzRqXqZHF7\nDcUg0qIHEbEWZwKMmyndhgfHIEY7sNjdBQzxQrdGoZ4SQ/1qoPyC9tLaNgYq\nlgoXLw+WR+/aYdQ5pmm5mAlvN6sY6CcpusP7bQzVO795iRbGj31FR6qtWyg8\nLZSmoOewlPa7IEY0uYqP3xeaCvYvAYDnp3x9B/wKcGqqS65DBD8eOY0ZlmfK\njQeEpZC0BsD/tQduhDYOQYLyKRfB79i4EkEXKDBYaXM1sQ1ie3nNh9aOgfDT\ncvjS\r\n=fbQO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDzOFMV9HWTgJLkryb/B5RX+IcLK2LJrCElKSVS+tNVjwIhAI2KvYP6XATqQhoM3EfE/CyxQaZfQrQwQGmCXL00WpvH"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.22_1551952121894_0.8134245257255537"},"_hasShrinkwrap":false},"7.0.0-rc-dss.23":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.23","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"0a7423630d54474c69202bfe27cb23a58d09f364","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.23","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-uOzQztGlNaycZa3nAG8nCQ7vbjh6zFFThCm8zsdaBSU1ju4QWNH22BMjXBA9gx5tRZitDjs4k9K82dbqI0i1ZQ==","shasum":"f8177b6ca52b062ce9f90b742d10be6c8f7dc76c","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.23.tgz","fileCount":174,"unpackedSize":2218710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch8bJCRA9TVsSAnZWagAAq7EQAJC2tfIUAUWFlIseSu5e\nI/g4fvF3k4qKx8y0TqjEPm6OiL2cVT9108HnytvdiB+4w1okZxiloBNy2Urw\n0FVLhVFdBHxD70MAbyH+1A0/U4bgn84f/BGxtRBcxH7YymkiY/DMP45KT0wD\nAoSr3ggr2S6wl+Tp3MuOLyCdEWj/V18dPzP9jcnaUDglWW1lrxugYgRpC8Nk\neE5yfE7A1pBdWSzJFWsv3ay3m/IZIcCz2LtMXvaO8cV9YvhNHjjpV9D+X5Es\n0V6b7FkFiGV/YiVPmgctXwUW7/j1vEeRHJu9unZlRGXM7v6J7hbeSSYAaxzf\nyizOEvW7YKayefvPhvnYUzuCXzPWWrQASP9CgjUtDtQUZX3zvjvrV9TZJSg4\nXwVpFJeYqxPY3nQ5rcmodF85RBr17jFlurWIK2VKRHF5y8LMLv/XSLZcgD11\nc1wKCZKPgTyeAACUsEzQQJawKDRPdQIG40zDq6DW9DuAZhlCyZCEopttvIns\n6zvaENzgT4mzTC3JD7XxkAj+4xfHqB5PBfYBUirG+ggTm39sL0j2bsIO0ffX\nAyyLK9s06N0wfq9gnvzYk6dVzj9wC9I53dNEj3VaTYlS0KgDHjr6TpA5Ot7p\nIHoS5DWYN76erqCDTzUrZ7jz0/WTHZxABLlqBblmu7siWXtaBX3fWE+H1lOz\nsBW+\r\n=TNnf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICAQvTz7GkBd6iadkv1db/i6aSUlrBpYrL+nNDewMvb6AiAOQsM/oIEqq7yUuu5vtrLQJxfwk9ADU8OZ00RVXllMFA=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.23_1552402120719_0.92669996125305"},"_hasShrinkwrap":false},"7.0.0-rc-dss.24":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.24","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"160ed814ff6e0ea19886bcd5e4aff9471837625e","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.24","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-qBl5YSLZo7n+gorLkQKOhM7J4dcICSK9f9heBb6aNV0RY4yS1FiP2WVfg2G2dQUGx78IH+jxvwMn6mpXBz+Vlw==","shasum":"b87f438e16fdd2ca40b8b34522f49fd0149c5eea","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.24.tgz","fileCount":174,"unpackedSize":2218893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciS1hCRA9TVsSAnZWagAAgdkP/AnngjuPwGKNUn5igJ2O\ndiW5WGR2IdIYmTaCtVHgx3SIhN/caPCINvJQKehb+L6TRCM2tSspIEKBkFzK\nPrFsaTzq3F4Kqv8+lxCMrMQmLyyAQ6OjXJqxi0FnxhgavMg9T/XtxslzTjg8\nbxflDpvL1vV7MIU7UGknqauQI5A5zU0ImipDduD0XXI9Yi1P6iyN4iWSN3Wq\n9cfw2qSnHeF8iD0NgbCyombwf1RHoDEz25HAC/4AhV1+wJIM0SI7VWK0pqzx\n2ad0jLM1Dul9DbGKjEluoT4Dx1iatV5GlJk/AgwDrm+o3x8AgDpXhJoNwwS+\ngEM52yXnLpAQX6l3wmusjTF1DtMV7sI67PpFU3Mq/f7bfiozM3kW4aIVWQHU\ngp0mN96g3Ss61I3y9oEhhpz8XkeNzfDRMqyliAe8G3QbVWnrwnVqhEmldU4d\nvtimuy+uQBRfxB2ySyTUN1KDUSKbaGXgUYdWP8JK+7yBLC1hICxsh9+L/yCV\nnvj2+PlTqyokhL15NTDIJQ6TchiDhKAK3GqKNtcDdDuAqMIybx/24tQkvDRC\nbX6CNknd8xlKLYUTPnKAy8rnugjYhGrRinAZ/a5OxNztuRBJlG69X1aGyKce\nJ3C46L3nl6/atxnvmhWOUQlvWVYEXIYKTAEHqS1/NPCoeDyjE9v+OeAJM7QE\nfym5\r\n=zgwR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAwGRYAgvjlaS3ye2Qq/xb8S4T8Kyo5h0YbDB3ruHs4ZAiAj3PSUyPF2OM56ehRc9HlXWmgf8dZYMeIVdJAMTsfqWg=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.24_1552493920980_0.16584123300004516"},"_hasShrinkwrap":false},"7.0.0-rc-dss.25":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.25","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"1e5d66729aa33396b6e2cfcf185354d348c7b1fc","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.25","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-Oso4ZCNdEh+fw/kckt/7Vt2paH7MF4zmkAuokeUEwjKo/l/ltMBLl/7v7m01pz+HpO4cvKGeh3H2/ly8E7dkhg==","shasum":"94ca62f60a498b0bbf6bf6f515a00a4ff43e86da","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.25.tgz","fileCount":178,"unpackedSize":2278116,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcimwYCRA9TVsSAnZWagAABAoQAJh/jtWkXFmqLRwxdzH1\n9QUTgDsOUAfg8avS5yyMSzS/KNoeo0YOvBvMIaDrm+9k9WswqngNk+TSwiYL\nIGlDqu5C+C8XTDlu93UAGPv5DIoMdPsxHIEM7mtKhhFPIEHHVnFgtHIdl3HA\nZz//IH5ReOPIBsRiQD/Elt5qbDoIsozladUV3mFzhgK0laJNX7dFmf1qc5QA\nhvazuH6/FsKeJtFuel1ogj45j/rd+luNHovXc3XIOAvahFwjpJYbkq/7o0Fc\nQCNLQ5L8+756iGjG8i+j+kaCHlWLQlPB+6qhJ0Go8xj3zXXyraTOhdIrd+Bw\nVGTWUL5tXy2AcJFkS+JRN7mnJSG0LkLY5R/U1vW5FBaOyHFxkDBzd1rES/1i\nOE6NapAty5W5IZBpVvQGlbCmYyyEkYg99pRVp84GXMSVQwhB+NcNmkjgxghW\n8GztyO3Lt9JV175ZVSUjcl2FbY0TDTTEA3BqfyNlLGrJs9jBsJHHe06ugTPw\nqzFG39YPjjkEyF0zxyU0iHkcAwwhE1Sm//gcAjPAXls5amYX9hSsOkMoCCD6\nhuTMzTCzV0XU4Q6jqTGz2E6+T/HblYXFO9QNvlQdOscS3/wz/7bW6v2w1ci2\nQ/7Q8poaM4KFVCKSbO6czafQKI0/Dw/rHXMlZLAKWC3ufLyArY3Hn+yE6cYU\nzV2n\r\n=H7iC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPKl/R1kSExi2vhwu+38R/pmXSbXBBj7c6s6n4opCTJgIgRyVAF9vk2ywyjMJUdBdx8quycJjYIlpw64umO7GXtl8="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.25_1552575512266_0.17548472018245143"},"_hasShrinkwrap":false},"7.0.0-rc-dss.26":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.26","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"109207aa7c444b2cedf8c0914cbfbda4b8a76ead","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.26","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-Y1PB5GD+IThp3QaeIbES8by1N8w2uFdipFZjgzITxu903LvHs1sieo/L9zLAf4RK5iOpdY+pQnsJKBa921cdoQ==","shasum":"ae0f45c0f7ef816986078dc4366b0ca60af2da6c","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.26.tgz","fileCount":178,"unpackedSize":2277982,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJci3dOCRA9TVsSAnZWagAAgMsP/2DMEytGrRGJ+PNmj4ow\no7D3WwPIVavU4qG46UIeIqNHWuAQhR9F4v01eeBRuk+Q1Vl+Sq4xHDO5HO52\nXu5jjRqzCiyuRnGBffBxaQuW2H9NuwRmR1XrnE8/yFVg3RLT8tLnxUHhBjAh\nXxUuAX+om+ZqC23x/xYue1Lu7+bKroQtoIihm8jLea5q/aAZBHHCgOhqVnHX\ntQJaQf9QI575JXZFr7Hy+ej/JGJMuScO7aivhB5GtmzcaXfiUD0RHrtmbEDI\nWPMViVifk3FsAR6B2oTgdyOY+PlM80foCmxmRaJoG5bklZg5u7AB7mqM3nGh\nGLVYvDRJZkz/n/YFu4GlJwj1IxOCTG22TK8USqA1RY6HA1gjdFR+0jrCu9Sg\nhlji/qSnGMn2Vr6iMcwvcf7z35+NO0RzgOShjG46OhuTWTSwhxgGxiYhevAi\neBBdp+InbCGzFHxaS0NqkiKx7+ZUn941ZDwkBCWwSz7xW1A9mI+3vKIkY8TH\ne/6kO34dkELghRNOpx+O3Ly+CnTPQnf9ydnD6AoWAyugQIhgnBelgpZwwW3i\npslXyp/kE716g5VeL7/pLUi/frNgwkIg3jFM8redy+S8W7TglVo4JKO/q0/Y\nqQx8zeYjgcrLyf9/YOgHmRX3SagYl40pgIy+WBFyRB3UYbnK1ovkH9PJcxoA\nRNko\r\n=ovJ+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDShfCPYA6e0wObSj1GwTdUxUFlyCkMLbFXVCr6Aw2vSwIgRqfiJhZ/KbKO2+vcSd/aBhSXar1LJQJz/4VB/J6cBaY="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.26_1552643918022_0.000679090802078175"},"_hasShrinkwrap":false},"7.0.0-rc-dss.27":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.27","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"fd6b392b22b304513271198b395f9d9059dd02d0","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.27","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-qCIWqX0sGIOx7x6jFi5zjSnQL95FQwJpIjf/Hl/ZD2+mrQsIfn0K2ZlEH59WTaF3u78LaGTvpir/HVQjsmCrZQ==","shasum":"cf0d6680e1e6b8fc3634f08486afbed24f2848a1","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.27.tgz","fileCount":178,"unpackedSize":2277855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJck8nTCRA9TVsSAnZWagAAVzQP/2eLBTrtXcweqCk71RqC\nLkKSilY6QagN8bBXccZox8L14jvfxYguXiVqgbkpHnqsYmsdDxm45+J1QdPh\nOVIrfLpCD6fAL5Gxqc7Ov639D1bIzb/OesduWgJtbX1RP51ojQSwuo71nP+7\nfqKyRgIyQHYvBiFGPY1dBAKJ1eYbTzppZ7DRgULyZqHnlHaxFD9w05he/TQH\nqKAj3DrUNRGBhJefHyyhC074tavM1wcUVATk3QZO4UJdxbq6Nlhop9tst9PG\n0XjuF+agnIMSvslw7lSORhfe7oaoPaJrUR6gXSAusgdwNmh69v0dO+DrVGgl\nzwkjAcOZnSQDIoEFI7DYoytp39Ta3fe3kpgwn7KWyY+qV/z5C5TJ2npT2mB9\nWhjUbhnH+q9TY47idjKI6ZiY7rbXCWRtg558wtOi4/ClksCS8VaN8AEUjnEf\nz7SnS0iYnSl79VPC6Zr7VYJkpTEmU1TpGNs9fWO3npMQGPIrh7DaQLp31TY/\nS2xw8jkQgL3F5ZqYjPkHorlq63glc6uC/xwAEg1LLFk57REsWDa/a9Se4CCu\nvmOSaY6LMAVPu8xOhF6HLPQDWWCshEH8IdpekrsFRhdfTcva55LsJuIMSFth\nUtpN7/DNLxdtzQMk00DQVhSvgOjX/+DdBB+RxRrSUypqqkeXN4PztEkVSnpd\nOYb/\r\n=pwUq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBCoH9kdwVNHFQfNQn73XQQxGwbDKMd3fMQhQvA4yM33AiBU3/7HEbwZ73p3hhDuOCzLz7GM2L7dKI/Aor9v83qv/w=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.27_1553189330396_0.17199586305050385"},"_hasShrinkwrap":false},"7.0.0-rc-dss.28":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.28","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"1d55bcbff3ed9ada41f1d603f39207bf1dbc05db","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.28","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-Mv6bfYA27a3RPjO+/7IHVpG4AQpx/HMseblF8tN+QGEo9mWZrlWpuQNTIndUPB21ouvvIvnbsN/Xp6nTaW5O7w==","shasum":"ec56d40e0505da64c9ab5beffc01127ac0cadbf7","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.28.tgz","fileCount":178,"unpackedSize":2277822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclIoRCRA9TVsSAnZWagAAo4EP/2/eXGZLhhZq79gJQ9b8\nmabMVsfy4ZhbsWQpFJXDPDQNb2x/QYCsOO2mxkNq1hZS2sJD/1rpTQxn7hYI\naTIeLIoG1zhLUEqV+YeP37/ZpYNftJxE4uhTD2wEaeKWYVajJJciMwNqOQwo\nEUq/rR5BquQr4g0RoEO5TiIrd2pFTS8dudiplba1TF2ZMzHXBWVe6Y6XOliA\nj0EOY6JnRVfMv4EWtZeijvL9mBegVU0LpTK70T0hjXGxKS9EKm06nsjY7i3X\n9j1glHss3QAjt9lT7yqsJyJxnTiuAum8DCV+ZNOsdXLY7qTBAuS9oyB87yQ6\nhWH8+l9HHa40TU8L39aoATD+UkViKo8nfWRdyMw/BBJQ0aB6QfW3Y/9Ibjab\nFQTNM5d9uuupupzQcUCGhZFpzDwKjZ/OX0i1OvXWK50uFCFJL3j2M1pcaxfS\nmdyTspXzagALB5eIK65ZR3eBS1Yi+owNJqN+TjN9S0VWbfpuL4l61Ehu0eci\nWSPGSyHbmoTcnEJ2NZ29SadjLfBHnCcO1+EnqxWDREx+OmCEknl95muXd+g9\nU/I8jUau5AFO8U90JlIMO5QE+mVVX21aMzezJjOnaqT5d1YffJVzFWpcgrLL\nX1NznHoThVIkySQNd5aflwyy8OTFjas0SpmzTwifbZ8Qhw6EEG9s2N0gmU4m\n68Jq\r\n=pheJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfYOtADwRT01K5fdH2Z2T4fb5o5PYj0Vl+lZ1QgzIDfAIhAMrpfZEoRRE0kZeZf7gM15EFFHrEcnsGbmB/Z8pF757q"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.28_1553238545349_0.8009800411771031"},"_hasShrinkwrap":false},"7.0.0-rc-dss.29":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.29","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _BW (BX)_\r\n\r\nTranslate Keys from Old LMK to New LMK and Migrate to New Key Type\r\n\r\n- _error codes_\r\n  - _04_: _Invalid key type code\"_\r\n  - _05_: _Invalid key length flag\"_\r\n  - _10_: _Key parity error\"_\r\n  - _44_: _Migration not allowed: 'Enforce key type 002 separation for PCI HSM compliance' not set\"_\r\n  - _45_: _Invalid key migration destination key type\"_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _LO (LP)_\r\n\r\nTranslate Decimalization Table from Old to New LMK\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"f21cc1213b63d1004f8c84f9e32159e8c50f12d4","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.29","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-/miq6Q3MCduYbAmLHdepU9WeR/4GJRQKDYtrbx0qIR7lGbt5QgygfkNHJIAEZdXC8p0tNcJAsD7/Dfo36bvtUQ==","shasum":"8aecc502abafe9df3699bfda4b4e0867a2f5dd3f","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.29.tgz","fileCount":186,"unpackedSize":2390557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmlffCRA9TVsSAnZWagAADPEP/1TOLj7Fd+rx3sAgpzvF\nfxuvuhHunBUPdHjKlnMQVnpTg1K5G9nXkrEz+1lj3+y0MJpZuTCtqVO7vGct\nkF1YarOi565tefoQ7BcqzYvJucKXVZjVz4YRxjVVeuCQP5fXc61IqqJ5gfqm\nNBdDVdXyFNZganMmczi1cFELatgQ+9tGtndqLgeRMkk/6frkoeuV40aDUi93\nMdY8yllE5cCb45BoicOZIQwHDI/RM7P2MHrs/XfWmfZWoJEiNrd3VI668jRB\nPPzVQT+4XdJqV7OqMpKBq3ponV6AiT09Vifb75lU6Af2ymSe4dNyUc2HFK2T\nd5MMQM1jVMF32PtBOTDqY4M0Riq8XfezTA0K/9iueMGQfKyhc67q4JbseC4g\n5Aljsgrqwy+QiVrOrqRdCAxlW5CWZNOOJ6OtqmMh24sdbFoiRxI96AcZcVE4\n1AzxLdNhJB28HGOMwBDOd1u8ddvqSsaNLrdULtQ5BtemiZgTqN8vDd4IW/2V\nHz32uU+1/CI/eb9fE62crehp6MyeIrkFw3Gq1akGdBXnF3Cyp7n5rIQ5pOxj\nmbaQzrhPW5xbm7XtCTfZ0BsCU0iZQhVj0Nj+S18xFXeh4HQEfTHtw2uz/bgI\nI4FE/SKFjPl+73X7gYJUmBoT80pSBHxMH/2YKLNEyozEd9vMTMQcuKKprIIQ\nPhCX\r\n=lJWT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgEDfwCB2Kq1eg8k4MxYWWrFRxKYF1fsj6aRGUrYHNXgIhALcL2t1zp5nRetjpsYNX6QCg4fU58v7N6SGLb11+LtAf"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.29_1553618910679_0.2370740081972511"},"_hasShrinkwrap":false},"7.0.0-rc-dss.30":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.30","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BG (BH)_\r\n\r\nTranslate a PIN and PIN Length\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BS (BT)_\r\n\r\nErase the Key Change Storage\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _BW (BX)_\r\n\r\nTranslate Keys from Old LMK to New LMK and Migrate to New Key Type\r\n\r\n- _error codes_\r\n  - _04_: _Invalid key type code_\r\n  - _05_: _Invalid key length flag_\r\n  - _10_: _Key parity error_\r\n  - _44_: _Migration not allowed: 'Enforce key type 002 separation for PCI HSM compliance' not set_\r\n  - _45_: _Invalid key migration destination key type_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _LO (LP)_\r\n\r\nTranslate Decimalization Table from Old to New LMK\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"6216a290c8692c3fd6a2c60b4ab8dab88ee7af23","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.30","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-kWVRYM6p8kLpr8OQ3B14wsA+u8KDiVYZskqtlac8U2PoEjo4EnGq2ZoXXj606PNs3Ewh40O1UB7FOoBpCtRqvg==","shasum":"d0950b38bda7257b139569ed59a2f949494c710f","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.30.tgz","fileCount":194,"unpackedSize":2501361,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcodMVCRA9TVsSAnZWagAAJO0P/0MlCUMEk2IqzvoXGsie\nMWmKP0TJ0j/Jlil8fxJwVlZWoJymJed0pX6SPywp/u7SWJTjK4yV7MImbn68\nr3Uqpmct3uXYzfe5lFu6FXw+b3CIxEp9tA0YYBfOhatS6PHG0RF5bE/gHcdG\netIrga0VSx8Ipo86jI08ljiO0N+F0BxQ6isMw3ArfGvvSzZpDOriiLUnYApl\n0iXmT7Zijs1GCWFuOV/+6gq/3ruwmyj9Bnz1TDA+d06wntwRz4kXhoXEArwi\nDl2M310eeSp154hfO/U8dScfuy+4P09nttTDVxWLYu+qsHoOqRVLVMGsFkzu\nu6gCellk4H+Av4hiyAwBM3mGGmOoYbohfMIHq9FK5QaRvxPe2NIMYvByAvGI\nYZTeAniQzLy8b6k0J5lz9SaPjCk/ax7G72h20RjLYFSMykwQ8Q/ds/ETLKpT\nMyPl5LtEIsSnj1TdQeakp0r7IJNamBo7UzLseEYlbFETHOGcRgx/JZhzc1Iy\nqNuvGDZuH32wQx5FnGGrGgHsh+FiwDSLvqKWm0vp3iwKBtIxeqAZ5RSfaAG8\nTcS9g19+SXV55Lb9NwjQpHeTGBwYMPPsqBhfYHlCTW5LPZXQqP9o1o8fwdg/\nVJdUOUhLF/nZLKJXsy1bzFfoHmPsZm0V9IGFA2R4wgIK7+EYc2jSd3r0qO0w\nCs0Q\r\n=jv7K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaYLxsB2J9jrTqVnS4+ERfTdyiwDiVjAAxfsXglEjk+gIgH9IxzekQXnkSI5Guodh/HQr1BNT5Uq/BzkXpiMXxroo="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.30_1554109204835_0.8185213545793919"},"_hasShrinkwrap":false},"7.0.0-rc-dss.31":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.31","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BG (BH)_\r\n\r\nTranslate a PIN and PIN Length\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BS (BT)_\r\n\r\nErase the Key Change Storage\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _BW (BX)_\r\n\r\nTranslate Keys from Old LMK to New LMK and Migrate to New Key Type\r\n\r\n- _error codes_\r\n  - _04_: _Invalid key type code_\r\n  - _05_: _Invalid key length flag_\r\n  - _10_: _Key parity error_\r\n  - _44_: _Migration not allowed: 'Enforce key type 002 separation for PCI HSM compliance' not set_\r\n  - _45_: _Invalid key migration destination key type_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _DU (DV)_\r\n\r\nVerify a PIN & Generate an IBM PIN Offset (of customer selected new PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EA (EB)_\r\n\r\nVerify an Interchange PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _LO (LP)_\r\n\r\nTranslate Decimalization Table from Old to New LMK\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"510fdfc5a578d28d15b910744b0350fd0eee7e61","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.31","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-dG31US/Fg97vT/0U/Rl9xc0PAhmpiI1ElW4W7vnwmW24CgoAOG1VgUN6Q962CbEZHxnEnSdqB6OI5aEuXvumMg==","shasum":"c8ed22a72810d9e17a97e79836bb5e2a799ff999","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.31.tgz","fileCount":202,"unpackedSize":2618428,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctJerCRA9TVsSAnZWagAAKGIP/j9rHdQjAxx2TT07LEXL\nDbka1EqeWAm+b/pHZF/eKh/ELhPWuKylV7GpEdp/Hiaqpt9ddXtv2xUmilKy\nBtejL4UygvnwJbOSy+ZHdmP6VwcQ0RKUWf/Aqzc69okSoSRWLrTlmO+QPe4F\nrGmoP7Xq6B3qps6BgQ8D1MZ28kRwb//uX4rq1IDiAuNnjc9/iY3nOJEpcbYJ\ncFSvCPlyyj1EolzJc6/ag/xOwAuBL6OyW41JL3XaEovMOFOkY9UNHO2X01WC\nnzB5goW79qM3sva7aWeSWTXuTgQY34V/Ig5uu/sTkMwqPausbbivjvMCTtbw\n4WlpWafZ3tpWLmB9rxHrxIwSxndcRcRwhB2bemcYDrca0zKJg0hllQirDt2g\nhFMvnbHppdoj14DL/ruOZDhbh5MFqb8DYWY6unUnIkB4Lom2G45VefMPI4Dg\nCm057ahP1ymGDl7m9uNZq8psGI7QmxyF7mW487kKe6yDjV6nKAubGe7e54E5\nynM6pNiYB1FLfyvzzUSBS3EMPwrsSHg2U/NDOBXeLdUEEb/Nr6UiTu/Qj7qb\n5EDxLuwn8w0cSdFePt7fxUpABD4PWQv/QAzC8Ca45WAYQTf+6dNG4bdPRtME\nO9skMEMG7frckIEoN7eX5UYPHmNJfS5WPulkWZWAbprY/aYQPMioYAmtrlHe\npDML\r\n=GXst\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClTulGSwxs6wjah95y/reo60Z+3/LWgK+43xXBQhbTOAIhAP7rhvLeoVMQHg3XYlo3vztubdu8V6VJuLGsh4jQ8rXS"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.31_1555339179093_0.4147298348105193"},"_hasShrinkwrap":false},"7.0.0-rc-dss.32":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.32","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BG (BH)_\r\n\r\nTranslate a PIN and PIN Length\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BS (BT)_\r\n\r\nErase the Key Change Storage\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _BW (BX)_\r\n\r\nTranslate Keys from Old LMK to New LMK and Migrate to New Key Type\r\n\r\n- _error codes_\r\n  - _04_: _Invalid key type code_\r\n  - _05_: _Invalid key length flag_\r\n  - _10_: _Key parity error_\r\n  - _44_: _Migration not allowed: 'Enforce key type 002 separation for PCI HSM\r\n   compliance' not set_\r\n  - _45_: _Invalid key migration destination key type_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _DU (DV)_\r\n\r\nVerify a PIN & Generate an IBM PIN Offset (of customer selected new PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EA (EB)_\r\n\r\nVerify an Interchange PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _LO (LP)_\r\n\r\nTranslate Decimalization Table from Old to New LMK\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"54669b3595927c4a246ddec258aef989f91fa2cc","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.32","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-W3iVJ6zAsLl9a0j+El7SDgfjk+aQ/H8z5ZDMhuH/9HQNlqEe4+GeatHvp6OmKAKDS6dHgjomxhZ1UgG60xC3tg==","shasum":"489138be62bb7a462611f866c0f367b91136152c","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.32.tgz","fileCount":202,"unpackedSize":2618296,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctbMQCRA9TVsSAnZWagAA72kP/34ZKGKhkMhAcWta+RmL\nr9ZSLh/TT/58EpGMlkpzAprzPt3d9XwZujR2cYTh+Xg5Di++hYNlqDZLKr8X\ntMI/zZyj8qIYlEEUrJPa7RcHnb8+RGPc53rTRETnJPNptISW2a8+VAst8xJu\nyCTKZ/jX87x2SiiD2GxG/LVRzht1ntMZ8s7gpDiaOMtEyvlXvYdrBmN0M+pS\nLn8/gwPury/1HrLCXYGlC7xcf4QNTj9KabrkDu/x1mUAtnLnHm26xsWZd2CW\narzjPJdByO89LZ7yF6btt0y/lP5LwnT4dw+aHWv6yjpaPj1hr2BdsATQs8Ti\nzO8p6rH+sWAS2ugswuC3STEOsaHowsJMTOdVvEQLoM69QN35No07Kyl/Mhtr\nNMdGuths+/ottpvYORP9D7+cxAZY8XlPeXnZZFLcbUrmgGuQSPtrMgDN49sa\nMFg3CpGoQsWrffnxwXAKqjBBn80RAOg0aAP9aWuGpH7prVcwGdjLNTezBqFB\nw95NJvzCVgKgTzdqiUZ2Pk0iN4i78C0sD43KGXRU3g2b4W9lGv4iUwtBlVEa\nDd9vjCfQsaPVFduw0QltWwbevcj7fLDNt9/+aRU9AiYMoYoWkbn1CJy0kvK4\nYEn+S/2vWjIpRfHWMZlmWJZJUq7EtzoEbmiwafuPKlIC/85VJnKJFQY/zRC6\ndHfk\r\n=MEYn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3eCTSHw5RTRy5j5BIssXmU7wUsqAPPSlvSMu9UUPZVgIhAJ+YYDKKZpag0ddh0a7UntdEdxLjafCp3p61WPb2vkpk"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.32_1555411728162_0.2049066259406691"},"_hasShrinkwrap":false},"7.0.0-rc-dss.33":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.33","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BG (BH)_\r\n\r\nTranslate a PIN and PIN Length\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BS (BT)_\r\n\r\nErase the Key Change Storage\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _BW (BX)_\r\n\r\nTranslate Keys from Old LMK to New LMK and Migrate to New Key Type\r\n\r\n- _error codes_\r\n  - _04_: _Invalid key type code_\r\n  - _05_: _Invalid key length flag_\r\n  - _10_: _Key parity error_\r\n  - _44_: _Migration not allowed: 'Enforce key type 002 separation for PCI HSM\r\n   compliance' not set_\r\n  - _45_: _Invalid key migration destination key type_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _DU (DV)_\r\n\r\nVerify a PIN & Generate an IBM PIN Offset (of customer selected new PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EA (EB)_\r\n\r\nVerify an Interchange PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _LO (LP)_\r\n\r\nTranslate Decimalization Table from Old to New LMK\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _QK (QL)_\r\n\r\nTranslate Account Number for LMK-encrypted PIN\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"03a8ae38bf58ef2a905ed461f7f86410bf269891","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.33","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-DgzcNDBs/dDHxpy/rRij40IAbTNZZSEqMDKTOgV+oBZYep4Q1BVMpkDg63DgqRIYp4Y/syoOFfW3EOwQP5JeaA==","shasum":"46f9aac8cff165c1c556a6538a49b632706ac475","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.33.tgz","fileCount":295,"unpackedSize":2766568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctzgcCRA9TVsSAnZWagAAqeYP/32GRipBnqtHwFFcLcM4\nn6YxsQRZK8hhmm3rMqATQ1EqIijS/u6yPyj/e3dOeK4iqA9237FovOwr0p+R\nkOV1Of1/PM34CwVLTzRaskCFwrNAoJ8h55s2LPULAzVHR33q8PJns8EA78HU\nFNZm7tiN6LKWSfYc4l1goccDXQiH7TCfYhIjrOVF7LeCcEwFl+wU6BJjuWD2\nOVUFV3iOyCNe9Hk4MLjUkn0wsG5PpOIr2b5MRwaUDCfXAlAFb1sUzWpt5LR5\nL3IZnbW2TTgpgBo4IM/onmb9/ZOUIFGkNMYWmIych22PAkkJ2uxuP/yx/Fy4\nTNZr1QR0gsTcs4GbUFho/dQG7dLyEj+SxCnMicecW2KK83e9gdXP6KOve1+Y\ng935HXJwzyHQExFD6CDo5MCkHFbW7sXMyPXurCX75sCo9/H868vPcrcI2axS\ncmqAStssz5wq+T1TuVui7VbZ5resepAFGTjMIB1Pn+jPdwUHBKMNzMeWsg95\ntdjnR1XkJLVDkBcNJHyUUM/qok4IKtOdDIF/bV8UuHndbSMJ+bzo2IgsZtMp\nuMSR27u9c7ZuKiCb/nktc4DFoI5Pbh1FYSkpwylF2b5Xz2/1cI2cWXcFPaXD\n4I+sWrSKMVb3VAxnQuQ4k+ilYHOqaVL1/mCuu7A7kZw76ReM8ySJX/U2W9C2\np1S1\r\n=fjOc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIECqK0W8jVQOKzOaH4cfO6Isr/Z006bjUZZwhrXzfdq1AiBfxGOfSkIKGXf+4rWGrMWAkxGGBFUJVbVhQTM1J6DhmQ=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.33_1555511323426_0.7419295709812772"},"_hasShrinkwrap":false},"7.0.0-rc-dss.34":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.34","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n    message header in format _length/data type_; **for more information of\r\n    the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n    definitions of existing commands to be overwritten, or parts of\r\n    existing commands to be overwritten; **for more information of command\r\n    definitions, please refer to _Payshield commands_ below**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n    be masked in the log records\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined by _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n    _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n    _PayshieldCodec_ _encode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n    _PayshieldCodec_ _decode_ method; **for more information of pattern\r\n    definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n    instead of errors **for this command only**; **for list of error codes,\r\n    please refer to _Error codes_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n    error codes, or to overwrite existing standard error codes **for this\r\n    command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BG (BH)_\r\n\r\nTranslate a PIN and PIN Length\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BS (BT)_\r\n\r\nErase the Key Change Storage\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _BW (BX)_\r\n\r\nTranslate Keys from Old LMK to New LMK and Migrate to New Key Type\r\n\r\n- _error codes_\r\n  - _04_: _Invalid key type code_\r\n  - _05_: _Invalid key length flag_\r\n  - _10_: _Key parity error_\r\n  - _44_: _Migration not allowed: 'Enforce key type 002 separation for PCI HSM\r\n   compliance' not set_\r\n  - _45_: _Invalid key migration destination key type_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _DU (DV)_\r\n\r\nVerify a PIN & Generate an IBM PIN Offset (of customer selected new PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EA (EB)_\r\n\r\nVerify an Interchange PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GQ (GR)_\r\n\r\nVerify a PIN Using the ABA PVV Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _LO (LP)_\r\n\r\nTranslate Decimalization Table from Old to New LMK\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _QK (QL)_\r\n\r\nTranslate Account Number for LMK-encrypted PIN\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Mask Logs\r\n\r\n- `maskedKeys` must be set. It is array of items (fields) that will be masked.\r\n Item value should be taken from `messages.json` `requestPattern` for specific\r\n message. For instance if there is need to mask field `keySchemeLmk` in message\r\n `generateKey`, `maskedKeys` should have following struct.\r\n `maskedKeys = ['generateKey']`\r\n","readmeFilename":"README.md","gitHead":"64561aa4c9e414301af70be776e2379a030014b8","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.34","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-vlJQaZUk/A0YHlmx8IW/Qm9mCsQpLH7wTjzmY60UiyUdHtw3s/0R1RFy1SO1KGD8w1FZqkqE1VsGy80b8ckJRQ==","shasum":"251e7c013bc8794e4bd8f8dc564b041ececbc948","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.34.tgz","fileCount":301,"unpackedSize":2827628,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7Rw6CRA9TVsSAnZWagAAU1IQAKD1cLeW7t1rxjXv1S26\ncYQRAgrW+yt0eCmT+pZ3Kj7LrH/D/4DCdrGQkV3zfd7WN84XlAyIPTds6vXi\nnRyeu6+ciNS3tPTGP05Unh/5iyTnb2Ma5KoT+zRm3T2eaK03FS8nykOjoBTx\nDOzqMWlRjqlSKItlrpiL9Lk5QXIGLJjdgONtF1dCuhV+fd4aZsyHeFtANfMT\nnjZBWm3N8xyxKnPDxULOfuHiuG6yB9ytgMAcddePxk5/e4HbZrSNHPNA9q2x\nxSdND2Gen0p6inoq91bBlHWTvfDquyfhi9RbKAHNqDEpNMDmWJ77to9TQI6z\nWLxWC1fXtNPZhx0hk3gyt9HOuMO8nS8Lc3zZPak8VJ1yPSBeWGgdKKl4PO2H\nQcsARgOQQkupddkgEN7FNzGju3dojp1Gu8EgUaJKW4gIBFiN4KPrJmxmqQAQ\nc6BiqFwprQUeg7KMH6pFX4rBZx6qajKcnKOpKIE1ZvKmzyJTgHk3xLZqCYnH\n3rD3nY2epWQTVKO8OrgC4kSpSY5QHCND3VNSa6h1xAmtnlQF5qr6PegKD6Ac\nL+zutOLutChX97phFwzrE5JBmZc5JAU7S1Km1gruByMq6WQRvRXcTItT8n1k\nLlsax0xE0fK9Is1rK7xuq1J2nceJzkbl5lzfbVfpmAMy++z4/tyBWCvwcRO8\ndUMH\r\n=p5L4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmBqRkk2ZpBTbps2q8CtRSyOV+9+NVtMt24Z5oZ5jQ6AIhANJsoWZgpgJ549bOHdiHQXy7sm8+WPW12fk5STzTiJOE"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.34_1559043129330_0.8376160891706725"},"_hasShrinkwrap":false},"7.0.0-rc-dss.35":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.35","main":"./index.js","dependencies":{"lodash.merge":"4.6.1","ut-bitsyntax":"^6.0.17"},"devDependencies":{"tap":"^12.5.3","ut-tools":"^6.9.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration; **NOTE: for more information, please\r\n refer to _Configuration_ below**\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined in _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined in _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n   _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n   _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n   _PayshieldCodec_ _encode_ method; **NOTE: for more information of pattern\r\n   definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n   _PayshieldCodec_ _decode_ method; **NOTE: for more information of pattern\r\n   definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n   instead of errors **for this command only**; **NOTE: for list of error\r\n   codes, please refer to _Available Payshield commands, command specific\r\n   error codes, command specific warnings_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n   error codes, or to overwrite existing standard error codes **for this\r\n   command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BG (BH)_\r\n\r\nTranslate a PIN and PIN Length\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BS (BT)_\r\n\r\nErase the Key Change Storage\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _BW (BX)_\r\n\r\nTranslate Keys from Old LMK to New LMK and Migrate to New Key Type\r\n\r\n- _error codes_\r\n  - _04_: _Invalid key type code_\r\n  - _05_: _Invalid key length flag_\r\n  - _10_: _Key parity error_\r\n  - _44_: _Migration not allowed: 'Enforce key type 002 separation for PCI HSM\r\n   compliance' not set_\r\n  - _45_: _Invalid key migration destination key type_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _DU (DV)_\r\n\r\nVerify a PIN & Generate an IBM PIN Offset (of customer selected new PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EA (EB)_\r\n\r\nVerify an Interchange PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GQ (GR)_\r\n\r\nVerify a PIN Using the ABA PVV Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _LO (LP)_\r\n\r\nTranslate Decimalization Table from Old to New LMK\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _QK (QL)_\r\n\r\nTranslate Account Number for LMK-encrypted PIN\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Configuration\r\n\r\n  - _headerFormat_ (string) - defines the length and data type of the\r\n   message header in format _length/data type_; **NOTE: for more information\r\n   of the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _messageFormat_ (object) - may contain new command definitions, or\r\n   definitions of existing commands to be overwritten, or parts of existing\r\n   commands to be overwritten; **NOTE: for more information of command\r\n   definitions, please refer to _Defining new commands_ above**\r\n  - _maskedKeys_ (array) - request/response keys for which the values to\r\n   be masked in the log records\r\n    - (string) - key for which the value will be masked in log records\r\n","readmeFilename":"README.md","gitHead":"f2d8f2cd1edd763378760f2ff3d9e875a0d3a91b","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.35","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-CxhpKq10tklij+Cs7r+kpKblQyhUcmevIMYuL9aNtc5XSCiwELEjV5kBg3h8DcwA82j1TzQFSsXAMfFY4Bm2oA==","shasum":"edb885731d56fd90cc1890843d56b82bda41d480","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.35.tgz","fileCount":301,"unpackedSize":2827544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7++UCRA9TVsSAnZWagAAAhcP/i3XLv3UZNCQPkNVh5pr\nj+TjblX+cUPVeMneJlteARVg4LQzh5KzVRqreVp+oQRku8be8c32Lb9yFaEj\nvq7kZ9JzsT0lP3PAY0cEQbo6B5167FoeoYbI10lWSS+aHRkk7Pm/g7sYVkE1\nFDqzkPg+blem2DxhirKJYGO/aUed9nmDPwxhMNEAGjISN+vN9DXHn4fBubaq\nPv+ebRs7JTZPxkFhrR+NK/roXSPbPwRp9Dfjm+b7rtSDrocNHxqtLO9MYph/\nI72qUhREDyIc5CAlGhpuknaRuqgNK8OLqm2Q+cwxvKMgm/zZxJ20gMFatXh2\nM14g6BT+2IGRMpi1q+5T5cxsLw6e/lOnveIrHZ36WtHdd5WJr14F/TZMpi5q\n7CNqwokjvyZa3/LPgjnzMU6dT6K1xj/3d3bcibNCgxkG5GQQMy44Pj9liOgW\nxbvK91kCpELBYAS5T7FBdIC1T/ZfZcwIOorlgIcS/tAss9TG8JPPQD5m/Mkb\nnjKvA2LOzotcdveDotSF6P1N1dzQqRl7s8DhkHq/+WWtljYiwPERjDBMpXQW\nc7UV7M9MocviVNrUHdHErAsKucz/3cj13W4ugBQyeWV0iyB4SqhwzETtYit+\nWSgxpGn2ajPQhA6gYoFNITV6ny0IxIFbLZYsdt1kGI9VqM6bKrdzqds0FkkC\nR//0\r\n=zt+l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHrKBCHmCPC1abM3kWqmTzfbZ9iFFFv9h0gUp7rmIEheAiBiKjvu16AueO3DqTM7CLgEz3uBFWLV6qbT4l0g97R3IQ=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.35_1559228307663_0.3817547218769588"},"_hasShrinkwrap":false},"7.0.0-rc-dss.36":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.36","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.3"},"devDependencies":{"tap":"12.5.3","ut-tools":"^6.23.0","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration; **NOTE: for more information, please\r\n refer to _Configuration_ below**\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined in _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined in _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n   _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n   _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n   _PayshieldCodec_ _encode_ method; **NOTE: for more information of pattern\r\n   definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n   _PayshieldCodec_ _decode_ method; **NOTE: for more information of pattern\r\n   definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n   instead of errors **for this command only**; **NOTE: for list of error\r\n   codes, please refer to _Available Payshield commands, command specific\r\n   error codes, command specific warnings_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n   error codes, or to overwrite existing standard error codes **for this\r\n   command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BG (BH)_\r\n\r\nTranslate a PIN and PIN Length\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BS (BT)_\r\n\r\nErase the Key Change Storage\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _BW (BX)_\r\n\r\nTranslate Keys from Old LMK to New LMK and Migrate to New Key Type\r\n\r\n- _error codes_\r\n  - _04_: _Invalid key type code_\r\n  - _05_: _Invalid key length flag_\r\n  - _10_: _Key parity error_\r\n  - _44_: _Migration not allowed: 'Enforce key type 002 separation for PCI HSM\r\n   compliance' not set_\r\n  - _45_: _Invalid key migration destination key type_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _DU (DV)_\r\n\r\nVerify a PIN & Generate an IBM PIN Offset (of customer selected new PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EA (EB)_\r\n\r\nVerify an Interchange PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GQ (GR)_\r\n\r\nVerify a PIN Using the ABA PVV Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _LO (LP)_\r\n\r\nTranslate Decimalization Table from Old to New LMK\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _QK (QL)_\r\n\r\nTranslate Account Number for LMK-encrypted PIN\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Configuration\r\n\r\n- _headerFormat_ (string) - defines the length and data type of the\r\n message header in format _length/data type_; **NOTE: for more information\r\n of the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n- _messageFormat_ (object) - may contain new command definitions, or\r\n definitions of existing commands to be overwritten, or parts of existing\r\n commands to be overwritten; **NOTE: for more information of command\r\n definitions, please refer to _Defining new commands_ above**\r\n- _maskedKeys_ (array) - request/response keys for which the values to\r\n be masked in the log records\r\n  - (string) - key for which the value will be masked in log records\r\n","readmeFilename":"README.md","gitHead":"2418642cc6b3451c6c14188e73acb02e53a5b57e","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.36","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-7kTsqMxsY3pO2ivaqL4+pTILs7WZjprz0tERV/7bBRsDlfAaEY6DOtIw4G/fIF5iH0POLF4DW/n9VTaSAPUUPQ==","shasum":"00ac0399a0306bb444dd9dd5a35b3341afe6e5e8","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.36.tgz","fileCount":210,"unpackedSize":2732619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdS9h/CRA9TVsSAnZWagAAzhkP/RIR6jvVMBpdy0Gjt+q9\nlGkXk/wbm7lWi/hFt25JNAsIPrdKiYj/HgwUoLReHF/Pque6NranNdti7+se\ny4Euc8OBqIFJrRa0piVD9yLdkaz9ecJDWDJZQ+tv/Jc20iZ3KU+O8SbnxTqo\nJT0GQJuBZLpsXxb1/9HApUe7LIT3jRkrML+acJPTlXrO/Z/+/VRpYBpBFzqG\n2HfKdTQEMmbTeM7mK3cefqu1w7NMrxDDjcvQcxH2CsEdq7kmSG3F57PQh1TP\n9Q9N5P2Ge+3sk7Oki1g1om6OfuobsNm8ExOD4LD0xX92ERvZqsq9ypJ8JzU5\nHZtcMTlHmj2seGxO3i5xWLjhni+ZO67wgA0CdHeHFaUP1MkA1RpVzt+4m6fO\nQiBy5So4GzxgX5qqHSEurGLhabHb2uV19bd90VfhxZqxwOPfg9YQV77U4n9w\n8xaU8Fv7d6cyDVOxnrpQ7q48S3cfG+rZIG8yllxvMXgZkCiq/3BkebSmQy1P\nMsVUsW1Q+TE6VBZQS4zC1WHOk0kqDeviKoF7Uc6boGsJXNcYjaCKaFjw+d1g\nthKMZU//NyFaZFukosUbsHbiV2La+O+h4dBepJZwmMzgIeS5LKQQEDkwoIFk\nsNO37MGzdKBJqUMBpMhc2lLceKhXYQm1epR/SyJU5jM0sGggqWQrnsfRVYtr\norQT\r\n=lQE4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQDFRdUcY3eSOP6JiqI2oEOvBDDCv6ygJfT3mbh8r9CiXQIfbty+tJZX59grwLzrVzWsN5Gb++0ZQYH9eikCBTMeMA=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.36_1565251711078_0.015605858325020927"},"_hasShrinkwrap":false},"7.0.0-rc-dss.37":{"name":"ut-codec-payshield","version":"7.0.0-rc-dss.37","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.3"},"devDependencies":{"tap":"12.5.3","ut-tools":"^6.23.0","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### init\r\n\r\n(config)\r\n\r\nInitializes the _PayshieldCodec_ instance\r\n\r\nparams\r\n\r\n- _config_ (object) - codec configuration; **NOTE: for more information, please\r\n refer to _Configuration_ below**\r\n\r\nresult (void)\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined in _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined in _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Private API\r\n\r\n### maskLogRecord\r\n\r\n(buffer, data, {pattern, maskedKeys, maskSymbol})\r\n\r\nReplaces predefined data in log records\r\n\r\nparams\r\n\r\n- _buffer_ (buffer) - data buffer to be written to log file (encoded _data_ object)\r\n- _data_ (object) - JSON object representing _buffer_\r\n- _pattern_ (object) - _requestPattern_ of the command, as defined in\r\n  _Payshield commands_ below\r\n- _maskedKeys_ (array) - keys to be found in _data_ and their respective\r\n  values to be replaced in _buffer_\r\n  - (string) - key for which the value to be masked\r\n- _maskSymbol_ (string) - symbol from which the replacing value is formed\r\n\r\nresult\r\n\r\n- (string) - log record with masked values for predefined keys\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n   _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n   _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n   _PayshieldCodec_ _encode_ method; **NOTE: for more information of pattern\r\n   definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n   _PayshieldCodec_ _decode_ method; **NOTE: for more information of pattern\r\n   definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n   instead of errors **for this command only**; **NOTE: for list of error\r\n   codes, please refer to _Available Payshield commands, command specific\r\n   error codes, command specific warnings_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n   error codes, or to overwrite existing standard error codes **for this\r\n   command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BG (BH)_\r\n\r\nTranslate a PIN and PIN Length\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BS (BT)_\r\n\r\nErase the Key Change Storage\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _BW (BX)_\r\n\r\nTranslate Keys from Old LMK to New LMK and Migrate to New Key Type\r\n\r\n- _error codes_\r\n  - _04_: _Invalid key type code_\r\n  - _05_: _Invalid key length flag_\r\n  - _10_: _Key parity error_\r\n  - _44_: _Migration not allowed: 'Enforce key type 002 separation for PCI HSM\r\n   compliance' not set_\r\n  - _45_: _Invalid key migration destination key type_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _DU (DV)_\r\n\r\nVerify a PIN & Generate an IBM PIN Offset (of customer selected new PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EA (EB)_\r\n\r\nVerify an Interchange PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GQ (GR)_\r\n\r\nVerify a PIN Using the ABA PVV Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _LO (LP)_\r\n\r\nTranslate Decimalization Table from Old to New LMK\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _QK (QL)_\r\n\r\nTranslate Account Number for LMK-encrypted PIN\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Configuration\r\n\r\n- _headerFormat_ (string) - defines the length and data type of the\r\n message header in format _length/data type_; **NOTE: for more information\r\n of the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n- _messageFormat_ (object) - may contain new command definitions, or\r\n definitions of existing commands to be overwritten, or parts of existing\r\n commands to be overwritten; **NOTE: for more information of command\r\n definitions, please refer to _Defining new commands_ above**\r\n- _maskedKeys_ (array) - request/response keys for which the values to\r\n be masked in the log records\r\n  - (string) - key for which the value will be masked in log records\r\n","readmeFilename":"README.md","gitHead":"be9e0521ad22cfe82eeebf6589176cd79b05e748","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0-rc-dss.37","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-Szo2WHIY4mlx/erz/NPBQVDpmvPkREweH9asvK38ljbM59Yae5Ss4IRYXxVpjdS/y09EJ4jxMPg/7BVzODGhtg==","shasum":"9cee6190eb2b615a644317a66af685b829712560","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0-rc-dss.37.tgz","fileCount":210,"unpackedSize":2732815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdS+Q7CRA9TVsSAnZWagAAkLYP/ikrkEIikafY1g9qHL/z\nmVqeGgqTe1SrF1bTZ03lZOyqnML4lFZDyOyMrqEVGS1erePgn8qzrOGal4sh\nFW2Bps+S3YFu9UGpx4vLWXm0EQLuWsYEoijaPMDZDF1P1T5hhG+xaP7a+h2t\n/NSPs7tekXVcRSo6GHuCMG6roaHdPFAPjXQRBSZkctbzXRWA7hn5hfpIYIao\n0/LnLvNGrM6Rc6YQvQZ2a+DHq+pOuJ9nghs2JoyAKqzPsPZwKpB6Oj5rPUBP\nnSmXHP+bbjOhNEREvGoc1ld5dk273IW81x0o+08asl/xzjlj4J2GQe5nXUij\nqgBJvBEsUXwL3JNxv5vl5issVl047OUaRz0Xqjj5puGvTUV9dwtAzvTqK1h2\npwbUV0GuKr8fAnwwIERau0YrNnzDFOh37FaUqpEiCfV7w5Td63/KIqDA4g6Q\nW7Ll71QwYxxipFtJz729BXE1N/4QelYvBZHs/+8D8BcLTA3sDnIq8aw02T+8\ntPGhsh185+c6pC3i31wQbAbmDT95NRqcW8Wtxl+rp7SdZyOEyIh3cbRcsvqB\nQ4y598niITf42AWDCYsM4wPXBmLxH4booEifGpWwuEd6q0YtJWzOYXznRGlf\nnLYQ9NtdwW7jqDgv8QTxTM7MWVYHCgV4wXuQzr4v9KMZoIgWjaM5CIaHFZUx\nANEl\r\n=lMCr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC/U+BcnHv0UTrHeBOXPdMeSmMR+lucpQ3He+sQ3M8k2AiB9PEsAbE8K4wFy4BFSlxUS3iRhhZDytrw8h5hmxcEsBw=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0-rc-dss.37_1565254714740_0.5678764495870705"},"_hasShrinkwrap":false},"7.0.0":{"name":"ut-codec-payshield","version":"7.0.0","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.3"},"devDependencies":{"tap":"12.5.3","ut-tools":"^6.23.0","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"f49863b86d68a40109c539dca87b08e93cf104fd","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-h0kHnd7C7DovCru0hzuvMlHymGHWcceWa4cFSUq1gZ6maykrvWUopuWGlHlFG0pNFZijyUKboXnmgS24oI/L1g==","shasum":"b270b2b3108d4b0b9435dc0085412af17cac7294","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.0.tgz","fileCount":210,"unpackedSize":2729635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjL1eCRA9TVsSAnZWagAApjUP/3mHiXa3DTSy3ikudYuf\n8sWu5DgYCQBNeUiQAG0FEpdSL7S5+Dxw78SF8IQ+wCMRNxADGNfPqsI313Cj\nyoh65rj3IQxPQ4yBe6tIcVCb7FK56DPGzHr2Yjux/es6N68lUYChMad6Ofrr\n0DSe15HS4zkqQIfTI+t5Ti2Q2EUlDdWbuSYUQBZ6d692UdKt3uwr4xdAL/Bz\nAUXvy3+hrnZ0gKd3goXnEykQBCnmHDqiJujKkRyazq6czQhGe71tNOIiKEBH\nmPC1vxEO8k/+2MCkn2tfceKg45r2ju0HzlabvMIf/ydCcPOfKDHdNOx7Fa63\nP5c3QE/VKLDX5r3GGmtbmcc3/8rEsjOEJunUPl0WZTAMNIfm+Mu9vNkvoQmE\nXdNnWbL8Huvihh6mTPGkHRvPbFH1m+wQdyGlOeFUcwL8V4LcLJsY99ndIvam\nxbKLkPPF71AMn1+oG2N11X7bSfZlW5CYRnqWRRnbTkSUuXRZNOx0s5nBmS44\nxWj4E7qjWDTtu0+ekkkwUMvzTw1X0PZLD2YAdiWBGaT2Me3Lu1bmFBGUBWoc\nB4ft3KfY2cZZlDc0jrJWVJU2cv+0LzpADzRqSZZ3sZIzC+67xaFEDaJ1XLBc\nQlm9Zkjg6638+0fs/YTnBhoWZcEf3iJwKiXF6V7fZsk8cqtejwotp9dZs7DK\nOcD9\r\n=Jlip\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBdgFnnDn7Y0umXD37PtDCy5Ctm83nadeZW0gJlhp+bPAiBqQu0VlsWh6biHj8gB48HthRLD2zPTYNAYpFBMCU9ZUg=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.0_1569504605202_0.2576819411589535"},"_hasShrinkwrap":false},"7.0.1":{"name":"ut-codec-payshield","version":"7.0.1","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.3"},"devDependencies":{"tap":"12.5.3","ut-tools":"^6.23.0","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"711abe0e98873fe7c61ac1812883472182d7ee16","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.0.1","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-s2T/CGDjJr8m0Mj05+pN5aa1ZK3873lvxPSjwRSY4UxlulY5doNckclIK0hQVjCpxZc1VgUIHU6GLDG6GXBX6Q==","shasum":"6145d0cfa2f4b501b2b3a998eef3a70d3735f105","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.0.1.tgz","fileCount":210,"unpackedSize":2728777,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjg7NCRA9TVsSAnZWagAAUJ0P/2ZAFzdmQ3dVMIs4aJaj\nXyWTkFu24/X1EUtbO2ss/PhrXdijolHfDvZVE0YtTh302wMuKExX/156UMfp\npZx0bfOs8p0+O2B9OKcHEy7Y+KtDACsBX071cOKkFuYfdQMKbFEx0WTCOXV+\nsuO3xo9hGaT2Bgo6bdufAZ3ZLAWmzaB2xQSFYA+wNpSZcDaWz5QGsV1FF2mf\n/Zu+JS//PF4aLYUvr2gNLBtTPG4UACxOM1I15Iju/o7O9IFtz+iZTNqzTPVC\nPjt45pRGTD8e73mydeNgmX5ng0a90vWrC47/0phxLADFvpXBzxe8fc7AauMH\nAi830vdoCqfVA6EMYv/k7vyj2+tGVZbwkdsFOU+xyj48rhi7byCMZZh4+sI3\n40n16RWoIjcbbvCZCQkFO463D5/G1IniT1Zgzndbk94W4jZSe0Xlk/7PcYte\nbIpzPnZ8jOmX6iSkUJ2zfBb15VIYy/ft8bTlSduzTJmrNWOBxh4CyD2/gSW6\n4E9sFj3POMVZhaVTSJxCEySxCwhWm1pTZmKMQgvEjVMdkn/1k1ErYJPeh6/I\nirK5cxA9RmwRix3onu11+OK+6uYdEUrfDV8C60wIBGbJDfwExQC2jgMMMaLi\nhSPkNYz5/szxz/IR5aPLfirdEIsFSpvJpiMcsaQ8kRvGmvcs0AOov1hPQBmb\nJhP5\r\n=vpB9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCN+F0Vl9CNdNg71ehn4F3z4OsauPZsZt1q5/GAETugCwIgLEG9iJIysvevXHzMGRhh4qVR7di1JgQeQbiN+aAxZGs="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.0.1_1569590988395_0.5960135878299235"},"_hasShrinkwrap":false},"7.1.0":{"name":"ut-codec-payshield","version":"7.1.0","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.3"},"devDependencies":{"tap":"12.5.3","ut-tools":"^6.28.0","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"26c99445439f06bdc05467f443091227c8efad40","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.1.0","_npmVersion":"6.4.1","_nodeVersion":"8.16.2","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-o7TzWdK1ghQHb8IvRI/IlVjyvKEV+g3LU3MbgaomlG8ewXgBxBR9cavawBp3gHWOQUCnIJu/+Io7sDaSscGbcQ==","shasum":"76cf8a209522c6046cb24cc16c5cdb01d303feed","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.1.0.tgz","fileCount":211,"unpackedSize":2844754,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwo3QCRA9TVsSAnZWagAA54EP+wQbhbvvs2RCWWSgBCAN\n0JaJbQ/+LDcDBSzeYf4MX3OZ80/fjkOEenZaT1ve5Dz92KMmnvUUTTfX3yB6\nGJJYw5DqOi4U1zyNR20h6IwlIBzWtt9uKV1GeJMqMxLnRhllOV1607HeAAlC\n777MZ8T6Wriznl5w30BRmczObWZxtjQC7eKdanbRncaBUJApAYlIegJ0jQdA\nBFjq/BBMswJMtTXxIQ1Hu9047418KMltYdsmPFQtP4xFTXL5lwT8oxZRaP+z\nlkkRG6DoAvf2MBNYFBYEXKXxc96WEf3oDVFQdcEj99ggLx1rxfk6SCJ8dyME\nuOngYtD/m/JiqzLQ/FfGsWoSCZet9R5Fwk+R0SY1a3tLn6quQJNWItCC+REp\nbTz/VSxaqDDiU70uCvW6nDxynn8d2CLkA7NUutxPX18cTUVeMz+mSVT9Qujv\npTA7IGGAuK9facVq6NQ6SBnBK5COk6wNYGfLoqrZsgGDgxqH3ZCSKYP8xS+J\n+GTkj5QuoNCy6KBwMTPPJBF0dalESDx+nKu2Y5S13yWxKmLRoq5ME2xLoH56\n/MCxgN1gwJvnpjrNruSOGGgRR6kwsvZxVCs4Sq+rGUfkg3Ujm0TkG5+hkSpW\nUzMw3BL5fkv6yoc/97Ovm9EGy/Xp7f21xhtd96o12CpoYrv4IPDD12SBh/oi\nPYDQ\r\n=b5Yk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBBRf3okCiQrtHZsDuRCHT2TLnqyXeYfaP16i1V/L6ATAiB1evjjYIVze5SbF073dm02A+Aajot0E2P/wdKCWgdmFw=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.1.0_1573031376414_0.3170821094157219"},"_hasShrinkwrap":false},"6.5.3-accu.0":{"name":"ut-codec-payshield","version":"6.5.3-accu.0","main":"./index.js","dependencies":{"lodash.merge":"4.6.0","ut-bitsyntax":"^6.0.15"},"devDependencies":{"ut-tools":"^5.32.5"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec  \r\n\r\n## Scope\r\n\r\nEncode / decode Payshield messages to / from buffer\r\n","readmeFilename":"README.md","gitHead":"aad7c3c4442c19ed2d1c48a165003ae6f7ffb08b","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@6.5.3-accu.0","_npmVersion":"6.4.1","_nodeVersion":"8.16.2","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-+KmvO9q8uCMbQPdUiVnu+v4UOQ/B0A8dcKEiHkFRqkqMGU0cyPTaFfi/JL53E0x8tPfTROPnU1cIxgUbBNuHzA==","shasum":"0ff0472d13961bb72d9a2d32e6254f75b469b696","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-6.5.3-accu.0.tgz","fileCount":25,"unpackedSize":111726,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd11gcCRA9TVsSAnZWagAAqigP/1W3iFxkXWOXX92gku0r\ngKJxBgTVFo7SN8xs6xeHZv/E9HTfAF//omcrWioV4NejiOBch8mDhyHqTDH1\nu4duMNnCnKkvD+CGAm5FABfbUi2ZnfxUAqphE4yloJ/2KslOnKSBYrcRPUm+\nK/Jw3pviARDXQRlqKMF5K3TNkfcfe5fR7vD42nV6oHyhTfZYw/0E+931IQun\nw8Gb3N7Aq940N0iz46EkO5h5WzDvvYT5tbHqx3IkU1D3fm0MtUYeyzLnAqOM\nCnMpkDcAxlJGDL22PqjOom89VhPO1QQkKDzK4AgG5258fwREIAQIzaQHGXkB\nmTgs12U8oeCo314+ZZt5JCBhDEOTE68ypO/KNcf1kK1eANf7ZQ/ETZJQ6DvK\nkPrJCrUwFct5gqxlNhQebTiZ/qU6kR3HKiJ02jcl1heq2nQ+n/8tqGPYUCOH\nnDXiwdpuZbg6yqdQ9kXwSUZWVYVw/k6VoIhYXIdwC+v2MuzjwNwn9R1D7ZsU\ngA3EScz0rQzb9sIeBOVgfHf/AwHQ26ZFB3nQjcgvaW55oPW9Vad/M+AAMD5X\n1eUaX1woJsh5NzKcCY172cEaW/8KxMfTJhfds7TiaokEbLOyGcSe0ewARSFF\nANiOlw0v2CQKBFA0ic1DysLE0y5XvJHE6JCizsjpa7ONSXm9uPITQIdKWTbq\nNLT7\r\n=6Xoz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID4TEu7fuc9zi9h3rJUCU6jDe6wCnyCTn6Me+gryKGNAAiBEgeeg7lJipnmYPE/79EH0set6gU0yBEk2I+gsAxszCw=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_6.5.3-accu.0_1574393883993_0.6920514050582689"},"_hasShrinkwrap":false},"7.1.1":{"name":"ut-codec-payshield","version":"7.1.1","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.3"},"devDependencies":{"tap":"12.5.3","ut-tools":"^6.30.3","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"6da202ee44839f63e6d44601e8e0ac74856c4616","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.1.1","_npmVersion":"6.4.1","_nodeVersion":"8.16.2","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-q8wNZr/c6dPcNPZmwDB3BVPXvW5uxXcbF+FB+tIN1t+4qBKcmj+de3x6cCpYI27mo2doqHeB6LSlvRKeJX4nEA==","shasum":"5b70de48c08c2b42e52d9cde0887b4b6c005fae9","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.1.1.tgz","fileCount":212,"unpackedSize":2853204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHuTkCRA9TVsSAnZWagAAOtQP/ib5jEDlI6wYunhZsawS\n+wBD2slSVbz29a87Smrj6C7Yq4sSE6GgNostImxWtMSXt69HuFebLBfkjK3t\nKgPP/YWLS/nP1jBxqvMV0HRhxnGECthej5aJXwjng2rpFYayOt7LfLXUqtQF\nTwjhuJL2P1CfrWE236D44reJh5hhPvhE3g3s0u1Cz67EAFBeTXV/4t0K0IXg\n84AhrJW417AYkZTC75SYM27sBNs4/Fr0ZKU4j4jBlo1nOhlAnU5HMSHH7sDf\n1RwC2jSAJPSBqiylO26cSn9Jkp+qAqpm9E1UIW1x02Etueo9PHWVzAwdtwYC\nsBUiQjG2h3Xz8FhGBxxsBxNYEttbgO3BfGV3EFkIcFa+KB/ASLiISo71gMNE\n3JhlWfnTivrsQAfPVu1gkNLXAZtJj3v3dl/5M8XrOAkVoahZ1U73cNIb8x9S\nj8OxByddG0yyDgP5JVt6RRs2mriqGYYnIxrcYf348ihM6KvkEDhcOCVxwknK\na8rgUgzAhlOGlDZfd55zXsCT6kQ/CGoAPXKbIsD9Ju2KMV8118evnYeTOwJa\nnFpUA0poWnM1CX1OS1qf7oZ7IpdPdPPoC8ZSCl773On8AmfAdnwskhPb21mC\nESM9lO/MS2STKuLMCRDi6tgiVgf0IiJvUO1namvUh2O3YChqfbr2HwT++S8g\nfxE4\r\n=YmqW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHbo/9Lu7yncWckeshL9YxfPI1462AwfR5B3Xcba4ZUJAiBsY4JNF6uHw36xuC47y3OBEIX+CptoeUAU8oF/DuKH1A=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.1.1_1579082980114_0.8608009597181276"},"_hasShrinkwrap":false},"7.1.2":{"name":"ut-codec-payshield","version":"7.1.2","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.3"},"devDependencies":{"tap":"12.5.3","ut-tools":"^6.30.3","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"50618b91823caaf64455a546dd9f539b0628a94a","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.1.2","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-Y/4/fj8bnOpQMX9/5KEmkKlUIT2F3J+Enqb6LEY86MdX7u9N87RmBS+Il6gbFWCAD6SREeACMOLwmdR/V4gT5w==","shasum":"6846ccab3dd90479a24edbff0186b09c6e726eae","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.1.2.tgz","fileCount":203,"unpackedSize":2820772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIVwqCRA9TVsSAnZWagAAPpYP/AlzrgDvxGc1k4Cy88G6\nDKotyEpvWQv7PnNyAKLJ/2gvnxHtzVCxztJnjjz5U1gdOnJ+/txJLrx8WLAV\nsfGMpU8JTuXml0S/K62TSstoUrH1rdr2BocgNXVqUIgHBc9c5h+Ks3Gw5nOq\nM9qjKL09MdTflF5uUwXDcmowuLF61IQWKg6RImQmk6nDW/7f5bXMZkJwtTO8\n0C1+Bo1a3n7U629GzrIid31B+JoWn5lJmUFLg2lTJjCXCOrtVS6Qxux/PtfB\nQUoAKK/4hl2HSnm9nzlswGqQScxhpgvQoajzU1f32WUF9v2f7+PlLvxdCYIK\nfrIo9I4j2fKPJuizDpFhRL0nA7XROi6iOje9tNQKSSzYtIVt+VrSn24sArOD\nZU1UePqnRlGsbah7pbiBKeH/iFpmgeN1yfsSKYiP4g+2Nm5XqxSPEz+yz00N\nwUtNO0NJs917aIRMXvh9CzShUqOoFAEgZvvFyEjo2CRLoEwOz6V7v2uc1OUF\nQxIGnh8IpBBbBdvE9b4qASxU9BbfuTPnL6W2VffUz86YxaNa8NvtNq1ati/3\nJMTbhgPZFES9wIQkW5TlSml/T/jMwRbvij1oy8AJCR4o+25CKhYC6a2WzWZe\nVtEEsb1oXGpTqbQgWd1tdv8RfGIt2VbSCRH5tdZ4PrjJg0MCTB/M6krcoT7j\nfJp3\r\n=zMCN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSaN0mFCpnpQSiy/j1YlT2AenQPkHGK7JBVL+CIeQ90AIgMu8+yolorLxVcjXGFA8CjvXGX3z3lNM4Rx2C8LLxQhQ="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.1.2_1579244586222_0.5172869755556431"},"_hasShrinkwrap":false},"7.1.3":{"name":"ut-codec-payshield","version":"7.1.3","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.3"},"devDependencies":{"tap":"12.5.3","ut-tools":"^6.30.3","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"347efa861a4edbcea0acdc4cb6b3e2723a4a2c22","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.1.3","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-pb5LyoC4sVXLS6O+6zNloOctche4E3VX2UUbsDdsQREctRXT5uO3YnvZ6meeRIyLp21HVnmLExXN74Zow+++4w==","shasum":"9213fc4edb92701a08c39714b2e17f1420207793","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.1.3.tgz","fileCount":205,"unpackedSize":2823924,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIadPCRA9TVsSAnZWagAAxeAP/1Q+KrNR8JS88ZeqqG3L\n0+1F1ir9Ae+1phlj2bCbLAWASvCJTaF01UFAdDYTfIXGHRlPE0PZqYocSVte\nbpNRxqIsH2Mn+5ldiIMb/w9xCTmUIhoXgRJDOI5pfm4eaC0Cs+ygjUPa6zDO\nBHtiCWte+SU70lYIrGur+64VrAkJ4l5HFD6KpSS83y7RdXZ70VpfDmStHeRH\n7GgKdU18papgm02S1ybwPEkaQOKwWZM6UhJ9zGMlbkmDTsCS74iQVk1Mvue6\n1XJKjwiOPW/kf21pYxsNAgzxOamHczJ1GuAvXyg74WRSiZPw3pyVlls38Rrl\nQwROsV155Ehgw6ENPvsTSlo4mgd/AeOfPKihfa/A3L5eq5lUw66y84C/h49r\nrR+218TVKSTjtU29C2LJqltr3w3ct+xI3KUTWV9O/mpMzeSavXzX1nHqO5XO\ny8hHPQTCgoI8mJ3wkzL1ecxer3+wcbS9yW+EDYmFqSFYyRL0gZbWD1dCY7eI\nJBItaBnTVN1o3sghrfuHDzS6J3cHX8g2I7KeSDsct0E9mZ++4170l5Z/vjSF\nqMWdx8WhbzyL4A2PPghdRzX8Q/NcQ+gv9lwVyLq5O6FYzd/1MGhdfBtlINRX\nPydiAXgiTfVvKPB9blKRef3rHOe3miamGbyoFZBVNAeZVvf98Y1/8O/xP5XN\n2rQh\r\n=lupm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBSWACA2HKLsyhAv7lXruS6JfSW1NV4p7HvSgWQ6TbG+AiEAsHxawLNPpePUBytcStpMI7U7PTjH5+F0guWBeH+dYyc="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.1.3_1579263822828_0.13609263078018508"},"_hasShrinkwrap":false},"7.1.4":{"name":"ut-codec-payshield","version":"7.1.4","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.3"},"devDependencies":{"tap":"^14.10.6","ut-tools":"^6.30.5","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"176a6d244a412ac6b2b46b5f331f96ce619996dd","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.1.4","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-Y7lZYPOaCSOy1FZgRdCyyujhU3Kx+h/9Qd05Q1+dM0Au5UI3HMr/PnrPEjMc+SJA+yY8eEfchIpO35w2QA3DsA==","shasum":"9e8a33ad43e7b7e71b9fdd756ee6a68403f0b3b9","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.1.4.tgz","fileCount":103,"unpackedSize":295429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIa8xCRA9TVsSAnZWagAAUXUP/3lElyRpk5yVqGQrUrXm\nkC2oHIQJ+KzHerdqZpzNC/gVhE18kfvSbREOWnU1s5pZCTCNqIn1c24y9nWP\n5QQl3uIkjsgCeIorNubx2rzgyusDH+wL/lRciix5YVn7q/1UCXdYfTvb2Lvz\nzT4rMy3kV0exmhWTWg8NeYoztRNZtNb/JAusuORaUFbuxvfPEepsDiy0S2za\nCMeZ9zTz5j3PSXj4rDfpyeWm5m5XBSbGx9XfWkZTbo+Zkx1l32QBpUBeYma0\n5f+g0lTgIdiuy1x/Ul9UynIAlKxiqzLgX/54DE2lu3ftIO0uNP0O+l5TlwlN\nBZdTgJ1r2yZizMmsUgRqqGKPRQ8GHWHlsIA0C/W/1VgwR5Z8kHr5osOydWVo\neOXU5sL22qJFXjmNQHY/yDcMxri9S72kYjPsxUmsaw7nrMCEVqnDcQgsStq0\nao8eC/VNXndn98fEq1/wzsMiLfvVb36mhNzBd6BnF02sU9VebD0IY3Fww5yP\nEFw224qA34+q41hdbbZkRaxp9x1hepCSFpGAxp4K7GGQlerd605n4L8gQ20Z\n8JUJpavgFaU3GmqnpYsaKikhKrP00WM5S4yenszHYgEgJ/Mky4GsxD/WFKnx\ny/zCYIF17IoMkHhmDTQkR46HJ2NMEqjyNh4HJjLA4cTlcbYLUEpkERVxXAL7\nfQV9\r\n=XLMB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiNehvc02XLZjOXXpeNbDr4FlMostN3h+RSVXMU8y5mAIgfyNNSR/LnbjuSZ0Sy01NYLPA41arNT9RS9BHkcgqgF8="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.1.4_1579265841476_0.012295175413972625"},"_hasShrinkwrap":false},"7.1.5":{"name":"ut-codec-payshield","version":"7.1.5","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.4"},"devDependencies":{"tap":"^14.10.6","ut-tools":"^6.33.2","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"4f5aa02fa073ebde5b0cdbed426220e4fac2c88e","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.1.5","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-TUqQH/SUnhF2klnHOAPcZGg0etFXes4e3qVKwEb9V5c6+4y3Lg7uCk5d1OsHP1sXhOWLaNPlBJ1Mu9avJcHVgA==","shasum":"a47eebcf37634cce54db9a78172bf68c2cad4aa6","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.1.5.tgz","fileCount":103,"unpackedSize":295671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeU+H5CRA9TVsSAnZWagAAgqcQAJedm0W5Sigh27PTgo9Z\nBHKBkkRun8wRsKzPT+d8M83H/rzfRURVGhNpN++I01vgYoLJLnUjpMLcP9i1\n78zlOEm4EY68yYb6CoxSPx3EYhsWdcfNsQ7sVd+5x1PcLzc7m/CaUx/7jJiz\ns6bL5cD51X9DBknJeEyng1HzJ9K8SA3comQFDcKYBJxF18VzkxAIO0YPDyGw\nIVTCWD+9xAKd61CxtR06EByXg4pVgsz7rbA/a35MynjU7IllFdiHidQWnjHg\njLrTf9dnaWjQnWI9VQ2G6ncks/LCE/c/gDIs5ScKZumBUtgk5KpvQlwlqkTH\nILGvXm6FQLbwMO/S5cMfhmxs+SwBQxomTkjGKb620XS7kFpVETBF9pkc2yCD\nyQ9g1XMesUnztBW+7NX5WOY92hvgdUBbCNi/Mfwh+7ylQYtMIHSj8gswSMLJ\n3wZ5i9t46CaVUURbYjq3DBIEMjxdzWjC88WWE6ZK1NcGn0gFKvfmYQTlMFdL\n2MbLbHHmhF7zt7ZLIdYaiqnBVnC/v86e1fCXuokVUFKvQHARSTfZPiloMhBD\noMsWN/JryPFPvatZo3sNrVTooFYlMU+Eq/mQWktrBlOCQojkzAJcCSuI8nqP\nrEe9LS7rOF9av3ivXDRdc5RI19dq/L57l7cnnvTCQIvH8qVxF7rP843jb3IM\ngTNY\r\n=jGGt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGld5GmrPSafj6HcAhu/V6p7iOeQJ8uE5sO0BKQGq8uAAiEAj/IB13yTvOkpYFF+M2O35Yvr6IWjLrauUucWqVnrBjM="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.1.5_1582555641116_0.6803671755540783"},"_hasShrinkwrap":false},"7.1.6":{"name":"ut-codec-payshield","version":"7.1.6","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.4"},"devDependencies":{"tap":"^14.10.7","ut-tools":"^6.33.4","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"b375eb4b8a458edc991ba11cee668cbbd727b471","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.1.6","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-2FLlqQsrAX+eVnKhjmxAe9hFqbrypkbILiUYRO1u+rM8+A4etux11uleUlnCcCMdvzv9QxU/lsNpsKRkNeMFHQ==","shasum":"a85c7ec744f0bc374efcf49461308f3821052244","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.1.6.tgz","fileCount":103,"unpackedSize":295897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejuUeCRA9TVsSAnZWagAAhLsP/2qQT4FqZdo6X9mVz+QK\nwKnIXXK0/4m0/XYVjJQRLOgpdxaopN9eWdXyMlSm8m1wOtvsCnsz12MfLz08\nFXUXnPbeIYf9M/Wh7E5GYsIUE/9oCiRSWFaaPqOEVJC8fzDmDqj4pWIWIBDa\nOK427P+oA+81WbNQXw2KPHOvqsD6SRG34fJQbHts5/cxmYVofwxdhajW0NQJ\nrOOFeE0hxL8O3FxHWp64AS/juraSNOpIgaVWpfsxMS6OcFdXhJBbmev42E1z\nbJHQs/MxdYZYGLcOh+bT64VdTGrYKE7FlqCb96xy+FD50kn3vpjSR89Ves8b\nILhpG+kgVc5EaMgQWfvyAzodX8S6SttHuftzsZeXvNer2aJQKyGyS0BLQOZU\nzXRNUa2qyXa4uSWrJzUwViJw2L70HzXtoKJvwE08Lm+y9MnRcxx4zjrtiTm8\n279wfbCcYq+nISzyrd2oZ7ik5NU4cDNM+0ScuhZKam2DTY3Ap15xTSj9BipV\nbz4TSEq+uWPMcZkZIkIT18FnSl6c6qKxiVRwXgdcI/fKIdT/jTfL3zznYfdl\nhrLG4OQR68vmKK/IR38HWJcL1he/8dYEy9JL2JeWIGDGp4wqFsQQM4odKl7F\nJTjWnN/PEZthHrBnLrP5EzU+tIIjNiuLr4OGlVGZW5PmQ9rSh0zRjl9JMMH4\nbmUW\r\n=z+bw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDL1zmnAFRqIWmgHz0QmMbECzTXoSPifqINQfdUi3AIRAIhAKhcnL551Ml43nyXQg08OLxRkYIPJne+1feGLWeEqTE5"}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.1.6_1586423070035_0.11450093911533754"},"_hasShrinkwrap":false},"7.1.7":{"name":"ut-codec-payshield","version":"7.1.7","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.4"},"devDependencies":{"tap":"^14.10.7","ut-tools":"^6.33.4","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"761499862f44c79f3f864b56efea95201270d2ed","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.1.7","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-XyzQEgGuZdEKhuNlmk3qIYZZN0gwOXjf25/K9U+nsUz4nyt3gpeJYrvR8rnjxLTv4hslksgSxNgh/4xpUOR3Pg==","shasum":"80e9c82032595b7c630e32aa21da11025beb9ebf","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.1.7.tgz","fileCount":108,"unpackedSize":304029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeporVCRA9TVsSAnZWagAA7qQP/AgCnbCTd6uBmmmti3Pl\nmL6FiXdrNDKnoOLMvJR8dzG4PqiLEABJCZvTsLkNjHd0PbqfHd0c2DziFHf1\n/UQIpLBi28fo76ISjAT6m6BMOsczkN2HcdqZDjTVHA/XUAB1bbrd1Ul/s3Ku\ncgr4t2J2kK6ReGZANEpotAwB2jYqkCIWJfn/zJ7sEEMJeRk+A4875d92/xFo\nk1YwVox5vQfYy4FSEgqP4IsoEfyv7sL7vgBcKKn26SXTarXEZnbPc0eOB10o\n0A3wO+DdwD+D2AHvt8/7rnDISW0eNawTRXDuCiTjzoQ1FyF9gSgevJaLTJ5L\nLNm8B7WXnxwjBFiS9XrRHGkvG3cavB9DkYZMxgEnNQNRUEkSTzqEUZhNzkG1\nqjaHsHF2WNCGYAOw73Ekeh282HndE2Fy2I8NWq53Qbtzp0MwV1nIC8g0kuOy\n6TX36Ri2Sp6SPQq4FKnMOM2tQtE38x6DvAp5xySL6roXQiaGVebpiYwC24Y8\nXzKB6WgFhl3R5H0mqOxfQ8ccVO/Uq5OlP8u9k8SzG+ADWGssTtNPvHvssNw2\nU5zQ+LWPPAcDZunLWNADE7nCre3mfSbqm3qFdjPrnBU2K4kJWh/MLwRjY9eS\nk1+Q5IyR+gIII87rI0OAKX899r2/z9JZ7nuex8IgEVJuAqvEsPEq9XkZNsbz\nJN34\r\n=yHp4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID/2q1DkKlxRD+ZnehRe7ze2AFZky05+I6lDISmgTivMAiAFTpbie5RwO9RfpU6r2pNGBVfGwdgWarpNHUYg8OfSOQ=="}]},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.1.7_1587972820869_0.5367042446634458"},"_hasShrinkwrap":false},"7.2.0":{"name":"ut-codec-payshield","version":"7.2.0","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.4"},"devDependencies":{"tap":"^14.10.7","ut-tools":"^6.37.0","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"7021ed31c5ddd1ab51307c40f6311c08c0f6c3a3","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.2.0","_nodeVersion":"14.15.3","_npmVersion":"6.14.9","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-rHgtT5ydnLhvcCSJe1Cv46rSVMGhvJKvIrmXXtKcHxLt3iPAdSYFbA82K/xwJNaQW3X4y+Dz1eLmJcqRHhPizA==","shasum":"62d359b1d0b0c068a9184e7bf02a91fcef59a045","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.2.0.tgz","fileCount":106,"unpackedSize":306951,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZJmACRA9TVsSAnZWagAAq6QP/iJQ5NmUu35Rd5a4tpmi\nA4roSRVFIP0qdjWbbdJMzLVlRrOjZnzcP7MLZ4K+eMAUSNI38NVCz10fVy4S\nWhVUCfCMsEKWGUIQ1CDOn6Za2M+5S1huvyiPO2ybDdFfSroNU0vGc3pRFxGk\n5V1zHuZEZFmMJi1jRGTYvHg0LqjHPMObU9Bg5kZf1in2c+x/c8QiMWsFOUAU\n33ISJM5eItjVpFiTWQOZ8sSoAjCJXZVxUmq2BahFmShpWgZu/jNebCxo/eKj\nj04/LWBUdGYRpop1zXZNEmc4KB4xpVj94psNAvF/AlrBd6pXEztsHj5/wfyx\nmdQovzlBDlemvq4ocdBKjLd39Y2DbSDrey6I7BUCxiqb0tFDN35UttmTa+0Z\nGkFp0w9cQh7r6gL6l8hgyu8hhaB9Vn6lPbFkdQeVNs/l37ELEjqUp8tB2DdF\nQQqgL0zU1KXp22Ki8HosjgOOh/Xe6l7CpITMBi0nuJqr8r/4x1n3Cobuue+F\nrI+hO0cXGqJshdjESJgRnWmXzXx4dvScjTCYagk9Zbihkgn6Xn2LWFtLeWp+\nQhT6mpRjarLTJSW6QI26XbAxBDRTe5FPbvI7fjbc+O8NGxAIAJcHAnmzujuj\nwirkZNNwQKlHF8x0SKOtsB+8VQBFZ/tGA/UdlC+JAe10mngl3Kgq9ngqJGPY\n8Cgo\r\n=Beep\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCETen/Dr39rCmhSKdb7aJXkyXjxu4pc4woGUOdYEbrUQIgL6PFXfX9d0s4okNQGrQbKptusP+cEz/i/mKFPlBoxrU="}]},"directories":{},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.2.0_1617205631665_0.04715341102173154"},"_hasShrinkwrap":false},"7.2.1":{"name":"ut-codec-payshield","version":"7.2.1","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.4"},"devDependencies":{"tap":"^14.10.7","ut-tools":"^6.37.0","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"050ba01d73f05f47c3c02607b161ee2ba75315a7","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.2.1","_nodeVersion":"14.15.3","_npmVersion":"6.14.9","_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"dist":{"integrity":"sha512-qQE1l9dfItD/QeLe9KRUsUOx+NerGl++jxH7OwWd2EqZlK/61YcluzADpWLOCnDorI0zd9DUPtB7SKzp5i+I5Q==","shasum":"bc42d9a8c7a9574a6f395882908a6c719224dd54","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.2.1.tgz","fileCount":106,"unpackedSize":308369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyLW0CRA9TVsSAnZWagAAGOYP/RxjzvKhi4qy8Q8YurX1\nfWPmLXzeKTmj0gdOn4N3UJCRi9etCzxgUUOwxdq5VVEyJKpJHwuA0I/ooFAD\nwP13BKdYQRyW232UhuJUGPEx2V+eCQU3iwD9pPb6ny61qSoOevDUtcY8J0rS\nVfyKr86kkDXve9BY2VI/CdzKF/S0ZGudlfS88POqFdPfeTAT2F+nzdv7/aUP\ntl7FJ/yTJL2YINzrgtRU6xJsyaKCgtb6r0yRhO+Nyz+M7DEHCVx/DpVGhQaV\nkniez/F215Aojwl29DOfoVlFxBxu1K1QJjLgnyn9ne8ys2FZNs7KlTxlqvGQ\nXOF6VfCG8jxI//7nIy0V7yPhAVNiMugeDmSaPq2xiTVclCO72Mu8UgerLaLj\nQf2oIWNr2wdAQu0FbDadDnSTm3jw533Txk/FxENMIa8D3d/VFSXdTMj05R63\nVlr3pSTDnnFRoR8nnWlPpwXLtsDHZpriXAxUtXItBE3PfQTzk9dlt9L46BKU\n3j0FQEPihoEK88/daFZWfjFtiPPo3QDTXFH8mqtVpcxzQ5oltGYYhGuCqkpI\n6XFPD6NH2eGkO5uQwTw08xOQzXtP6lnmkJVvMuBWykB5xVJFAgAmMbEYWxOM\nwI9ZuT/uEQ/VnsUwKUflwLWQrGT7eBg6TlGXGjX5YfN/Avti7JODdUhlyt4M\nfcBI\r\n=mlT/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHBgcv2qxA0w872jR9AgfSjjh/2UuOlHDsEwwOXxe0HbAiAFcYL+kHVTK151XYtkSLGEOvKnNL18qjKhT9tjOei3tA=="}]},"directories":{},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.2.1_1623766452415_0.5749197376714854"},"_hasShrinkwrap":false},"7.2.2":{"name":"ut-codec-payshield","version":"7.2.2","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.4"},"devDependencies":{"tap":"^14.10.7","ut-tools":"^6.37.0","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"97697679b31e9f27aad6b582ea38204b2f9c06d4","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.2.2","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-RxhZZKsh03bz9+XN1XQv4GAmbam5gExhULKjJUeUJZ+fKRIL8fyhxae6ESL5ZjFFaCOlDvQDbN3zOhMM7++3gg==","shasum":"3123fc41dacf4284fb0eea3578b99c1f9d2737d0","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.2.2.tgz","fileCount":106,"unpackedSize":308514,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2Tyioj5QqDQl0YCcTgxcSkHnHJ4wTI49wqEDqO7d/rwIgIMztviNeQ7UlRs0hc601Lam/dXvGDIoiMJjbWYGQxQ4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimeuRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrKHBAAmusidok5cdQrD6qD0uQ6rB0wNO9jO0gsaVzN6z/5V/3ncFqu\r\nGk/Dj077Xeuv2xPq+uu5O8gzbSJQIXBgtzd9fKBD57QiSENrlWn3JsLwv0MQ\r\nNAdM+5I4oiSHG5pwasc5Vm0y5rMT2bBtTenWeGT3W8YojIlD5U+5ufslcSxZ\r\nCZSfwfIza7Hy3EipuV7E4bjouRGI5qX8OP+VfaPHKUfcIq0o+Ec+PJEp0ZMH\r\navNW2QvGDbBOqLFzDt9F5hVvau9WRTq83/MGTSK+4P4x4+YNZXhbjBt9q4ch\r\ngHDcTgzQtCA0jK+6wmksWkaHOq4zF9apvf99Zd+xJ1TQPZPTDTVIwhrMhdOk\r\nO/6/NR4s533gG6v0oCfRnlfqKD9TzSQMeT8Dx/i4MhbZyiRqAL36b8uOfA/T\r\nEqTgXl3FQI5FhD7oJqLhECDc/XHHQBKtm/pnoLBhy6i0aUTOmx7j6lQOqd1e\r\nmJUbBfjuSGN3EXMVR+9BLWtdWeHMS2RsRt1wV6k2E21CPSX4Eqo/mvv6cM6G\r\ndRFbdCfenBqHWChGFc1i3SrZ+YMdASt7+wZ2+W+tdxBbxC+wNPqmmD+FTf3T\r\nDmLwUw6q6aJjhjwygOSa/qtTvjmFZrqizCySrwK75ghBUSWliXzjH8b9oK1S\r\nQ9ob90VVZhJFeK6+/oGQ+UX511Z1Di7Mm1I=\r\n=uEnm\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"directories":{},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.2.2_1654254480871_0.4856892752808155"},"_hasShrinkwrap":false},"7.3.0":{"name":"ut-codec-payshield","version":"7.3.0","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.4"},"devDependencies":{"tap":"^14.10.7","ut-tools":"^6.37.0","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"a04ac71fdebe21cd3961c550b93659e3112217e6","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@7.3.0","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-zR9fuqgGZtLEbC64hP+/njx3LQdqLLoVd6PGvsI+uDbjGPAcxPrD8bKqrxFyq+WKmgdocZaG/5pRGqZKsPt2xw==","shasum":"6d287114f8353da803afcbf16a549c5f51303843","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-7.3.0.tgz","fileCount":106,"unpackedSize":315666,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3zo07j7uik+YFGmHhtiG3niGwlKfuSn3LdBHr3CQcWgIhANTzBU8ksBatLULIB+Bnbt3NE7KjpmwsVfrfxR6eFOD7"}]},"_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"directories":{},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_7.3.0_1691403812904_0.3204326402401927"},"_hasShrinkwrap":false},"8.0.0-keyBlock.0":{"name":"ut-codec-payshield","version":"8.0.0-keyBlock.0","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.4"},"devDependencies":{"tap":"^14.10.7","ut-tools":"^6.37.0","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined in _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded; **NOTE: all strings will be\r\n converted toUpperCase before encoding, unless otherwise specified in\r\n _nonCorrectableFields_ object (see _Configuration_ below)**\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined in _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n   _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n   _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n   _PayshieldCodec_ _encode_ method; **NOTE: for more information of pattern\r\n   definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n   _PayshieldCodec_ _decode_ method; **NOTE: for more information of pattern\r\n   definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n   instead of errors **for this command only**; **NOTE: for list of error\r\n   codes, please refer to _Available Payshield commands, command specific\r\n   error codes, command specific warnings_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n   error codes, or to overwrite existing standard error codes **for this\r\n   command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BG (BH)_\r\n\r\nTranslate a PIN and PIN Length\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BS (BT)_\r\n\r\nErase the Key Change Storage\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _BW (BX)_\r\n\r\nTranslate Keys from Old LMK to New LMK and Migrate to New Key Type\r\n\r\n- _error codes_\r\n  - _04_: _Invalid key type code_\r\n  - _05_: _Invalid key length flag_\r\n  - _10_: _Key parity error_\r\n  - _44_: _Migration not allowed: 'Enforce key type 002 separation for PCI HSM\r\n   compliance' not set_\r\n  - _45_: _Invalid key migration destination key type_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _DU (DV)_\r\n\r\nVerify a PIN & Generate an IBM PIN Offset (of customer selected new PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EA (EB)_\r\n\r\nVerify an Interchange PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EI (EJ)_\r\n\r\nGenerate a public/private key pair.\r\n\r\n- _error codes_\r\n  - _03_: _Invalid public key encoding type_\r\n  - _04_: _Key Length error_\r\n  - _05_: _Invalid key type_\r\n  - _06_: _Public exponent length error_\r\n  - _08_: _Supplied public exponent is even_\r\n  - _47_: _Algorithm not licensed_\r\n  - _48_: _Stronger LMK required to protect this size RSA key_\r\n  - _68_: _Command disabled_\r\n\r\n### _EW (EX)_\r\n\r\nGenerate a public/private key pair.\r\n\r\n- _error codes_\r\n  - _03_: _Invalid private key type_\r\n  - _04_: _Invalid private key flag_\r\n  - _05_: _Invalid hash identifier_\r\n  - _06_: _Invalid signature identifier_\r\n  - _07_: _Invalid pad mode identifier_\r\n  - _47_: _Algorithm not licensed_\r\n  - _68_: _Command disabled_\r\n  - _74_: _Invalid digest info syntax (no-hash mode only)_\r\n  - _76_: _Hash length error_\r\n  - _78_: _Private key length error_\r\n  - _80_: _Message length error or a standard error code._\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GQ (GR)_\r\n\r\nVerify a PIN Using the ABA PVV Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _LO (LP)_\r\n\r\nTranslate Decimalisation Table from Old to New LMK\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _QK (QL)_\r\n\r\nTranslate Account Number for LMK-encrypted PIN\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Configuration\r\n\r\n- _headerFormat_ (string) - defines the length and data type of the\r\n message header in format _length/data type_; **NOTE: for more information\r\n of the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n- _messageFormat_ (object) - may contain new command definitions, or\r\n definitions of existing commands to be overwritten, or parts of existing\r\n commands to be overwritten; **NOTE: for more information of command\r\n definitions, please refer to _Defining new commands_ above**\r\n- _maskedKeys_ (array) - request/response keys for which the values to\r\n be masked in the log records\r\n  - (string) - key for which the value will be masked in log records\r\n- _nonCorrectableFields_ (object) - each _key: value_ pair contains the\r\n following:\r\n  - _key_ - field name\r\n  - _value_ (bool) - flags if _key_ in requests should be left as it is\r\n   (_true_) or converted toUpperCase (_false_, _undefined_/not present) before\r\n   encoding\r\n","readmeFilename":"README.md","gitHead":"5b1b6e23c24a4a756cf924012252a9ee26fd4346","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@8.0.0-keyBlock.0","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-5S5qejU+cV5pCVYpT5l+uwg7IfiLQKfRlsHL2/xH8ZM7Xdhbl1YhD9pFCgKj0GaHjAOwPV+Eg6xYApT785p/yw==","shasum":"1c80d8fb6572231daea1abd0c94afe1f9a8cc48f","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-8.0.0-keyBlock.0.tgz","fileCount":106,"unpackedSize":316956,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF3kVSN5ZXfyR7qRtMrM9OtsiM+8mnDM1PaL1+HOwJQnAiEA5UQwVXYUXsF7/inlLwX+vDOGwWc4FZ/7ecDwyZB6i1Y="}]},"_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"directories":{},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_8.0.0-keyBlock.0_1693844216216_0.017680003266854927"},"_hasShrinkwrap":false},"8.0.0-keyBlock.1":{"name":"ut-codec-payshield","version":"8.0.0-keyBlock.1","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.6"},"devDependencies":{"tap":"^14.10.7","ut-tools":"^6.37.0","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined in _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded; **NOTE: all strings will be\r\n converted toUpperCase before encoding, unless otherwise specified in\r\n _nonCorrectableFields_ object (see _Configuration_ below)**\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined in _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- __commandName__ (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n   _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n   _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n   _PayshieldCodec_ _encode_ method; **NOTE: for more information of pattern\r\n   definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n   _PayshieldCodec_ _decode_ method; **NOTE: for more information of pattern\r\n   definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n   instead of errors **for this command only**; **NOTE: for list of error\r\n   codes, please refer to _Available Payshield commands, command specific\r\n   error codes, command specific warnings_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n   error codes, or to overwrite existing standard error codes **for this\r\n   command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BG (BH)_\r\n\r\nTranslate a PIN and PIN Length\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BS (BT)_\r\n\r\nErase the Key Change Storage\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _BW (BX)_\r\n\r\nTranslate Keys from Old LMK to New LMK and Migrate to New Key Type\r\n\r\n- _error codes_\r\n  - _04_: _Invalid key type code_\r\n  - _05_: _Invalid key length flag_\r\n  - _10_: _Key parity error_\r\n  - _44_: _Migration not allowed: 'Enforce key type 002 separation for PCI HSM\r\n   compliance' not set_\r\n  - _45_: _Invalid key migration destination key type_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _DU (DV)_\r\n\r\nVerify a PIN & Generate an IBM PIN Offset (of customer selected new PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EA (EB)_\r\n\r\nVerify an Interchange PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EI (EJ)_\r\n\r\nGenerate a public/private key pair.\r\n\r\n- _error codes_\r\n  - _03_: _Invalid public key encoding type_\r\n  - _04_: _Key Length error_\r\n  - _05_: _Invalid key type_\r\n  - _06_: _Public exponent length error_\r\n  - _08_: _Supplied public exponent is even_\r\n  - _47_: _Algorithm not licensed_\r\n  - _48_: _Stronger LMK required to protect this size RSA key_\r\n  - _68_: _Command disabled_\r\n\r\n### _EW (EX)_\r\n\r\nGenerate a public/private key pair.\r\n\r\n- _error codes_\r\n  - _03_: _Invalid private key type_\r\n  - _04_: _Invalid private key flag_\r\n  - _05_: _Invalid hash identifier_\r\n  - _06_: _Invalid signature identifier_\r\n  - _07_: _Invalid pad mode identifier_\r\n  - _47_: _Algorithm not licensed_\r\n  - _68_: _Command disabled_\r\n  - _74_: _Invalid digest info syntax (no-hash mode only)_\r\n  - _76_: _Hash length error_\r\n  - _78_: _Private key length error_\r\n  - _80_: _Message length error or a standard error code._\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GQ (GR)_\r\n\r\nVerify a PIN Using the ABA PVV Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _LO (LP)_\r\n\r\nTranslate Decimalisation Table from Old to New LMK\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _QK (QL)_\r\n\r\nTranslate Account Number for LMK-encrypted PIN\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Configuration\r\n\r\n- _headerFormat_ (string) - defines the length and data type of the\r\n message header in format _length/data type_; **NOTE: for more information\r\n of the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n- _messageFormat_ (object) - may contain new command definitions, or\r\n definitions of existing commands to be overwritten, or parts of existing\r\n commands to be overwritten; **NOTE: for more information of command\r\n definitions, please refer to _Defining new commands_ above**\r\n- _maskedKeys_ (array) - request/response keys for which the values to\r\n be masked in the log records\r\n  - (string) - key for which the value will be masked in log records\r\n- _nonCorrectableFields_ (object) - each _key: value_ pair contains the\r\n following:\r\n  - _key_ - field name\r\n  - _value_ (bool) - flags if _key_ in requests should be left as it is\r\n   (_true_) or converted toUpperCase (_false_, _undefined_/not present) before\r\n   encoding\r\n","readmeFilename":"README.md","gitHead":"69479731542b77dd99d6f6f006959a6ff123800d","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@8.0.0-keyBlock.1","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-tJ4nTbpqS7IuyM2cT/My7nma+N1nWht4c/Io1cZhGSWdX/rxMG3XxfDkbk7RXUjnrc1rq7FUxNrfmGB8dPg0YA==","shasum":"8af713484452e2f648cbfd031090523d228df1a9","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-8.0.0-keyBlock.1.tgz","fileCount":106,"unpackedSize":315431,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0elyL/vBzAOiQHKD2MskLkLROGdn4nrGYIukNYLqEaAIhAKZAUSVYd9GXeIyBxGvHowA7A/zdHUlF7dDoKeqjKqJZ"}]},"_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"directories":{},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_8.0.0-keyBlock.1_1693924483412_0.7331517380424522"},"_hasShrinkwrap":false},"8.0.0":{"name":"ut-codec-payshield","version":"8.0.0","main":"./index.js","dependencies":{"lodash.merge":"4.6.2","ut-bitsyntax":"^6.2.6"},"devDependencies":{"tap":"^14.11.0","ut-tools":"^7.11.1","ut-unittest":"^1.1.0"},"scripts":{"lint":"ut-lint .","release":"ut-release","changelog":"ut-changelog","check":"ut-check","cover":"ut-cover-parallel","lint-js":"ut-lint-js .","postpublish":"ut-postpublish","postversion":"ut-postversion","precommit":"ut-precommit","prepublish":"ut-prepublish","prepush":"ut-prepush","pretest":"ut-pretest","precover":"ut-precover","preversion":"ut-preversion","test":"ut-test-parallel","version":"ut-version","jenkins":"ut-jenkins","gitlab":"ut-gitlab"},"description":"Payshield codec","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"license":"Apache-2.0","gitHead":"4063d5b8a0773616a090aa3a5e13b435b93fb2f1","bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","_id":"ut-codec-payshield@8.0.0","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-SnRKzu+V6u4J81zrPmnXHMfRg4qnng9SS14e0uaDAiny25m/iWih6JJ7+BCJxXjQivNF+BtGmDXaWclswp4Mxg==","shasum":"54a149263d95aaf64345bf53b45527318687af61","tarball":"https://registry.npmjs.org/ut-codec-payshield/-/ut-codec-payshield-8.0.0.tgz","fileCount":117,"unpackedSize":2233060,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyVyb+NfBQfl3O5qqngKubivJHgMJq3o4ClUZ5VKS1rwIgE7+GW68XeMEnDdEgKypsVG1pZBPYZOayLnfGgreh0SA="}]},"_npmUser":{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"},"directories":{},"maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ut-codec-payshield_8.0.0_1713518392701_0.40785814570801926"},"_hasShrinkwrap":false}},"readme":"# Payshield Codec\r\n\r\n## Scope\r\n\r\nEncode/decode Payshield messages to/from buffer\r\n\r\n## Public API\r\n\r\nThe module exposes _PayshieldCodec_ class.\r\n\r\n### decode\r\n\r\n(buff, $meta, context, log)\r\n\r\nDecodes data buffer to JSON object\r\n\r\nparams\r\n\r\n- _buff_ (buffer) - data buffer to be decoded\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined in _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (object) - decoded _buff_\r\n\r\n### encode\r\n\r\n(data, $meta, context, log)\r\n\r\nEncodes JSON object data to buffer\r\n\r\nparams\r\n\r\n- _data_ (object) - data object to be encoded; **NOTE: all strings will be\r\n converted toUpperCase before encoding, unless otherwise specified in\r\n _nonCorrectableFields_ object (see _Configuration_ below)**\r\n- _$meta_ (object) - _$meta_ object as defined in _ut-port_\r\n- _context_ (object) - _context_ object as defined in _ut-port-tcp_\r\n- _log_ (object) - contains log functions; **for more information, please\r\n  refer to _ut-log_ documentation**\r\n\r\nresult\r\n\r\n- (buffer) - encoded _data_\r\n\r\n## Defining new commands\r\n\r\nEach command should be described in _messages.json_ in the following way:\r\n\r\n- **commandName** (object) - name of the method which will be exposed in\r\n _payshield_ namespace\r\n  - _requestCode_ (string) - _Command Code_ for this command as defined in\r\n   _Payshield Host Command Reference Manual_\r\n  - _responseCode_ (string) - _Response Code_ for this command as defined in\r\n   _Payshield Host Command Reference Manual_\r\n  - _requestPattern_ (string) - request pattern definition for\r\n   _PayshieldCodec_ _encode_ method; **NOTE: for more information of pattern\r\n   definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _responsePattern_ (string) - response pattern definition for\r\n   _PayshieldCodec_ _decode_ method; **NOTE: for more information of pattern\r\n   definitions, please refer to _ut-bitsyntax_ documentation**\r\n  - _warnings_ (array) - array with error codes to be processed as warnings\r\n   instead of errors **for this command only**; **NOTE: for list of error\r\n   codes, please refer to _Available Payshield commands, command specific\r\n   error codes, command specific warnings_ below**\r\n    - (string) - error code to be processed as warning\r\n  - _customResponseError_ (object) - _key: value_ pairs object to define new\r\n   error codes, or to overwrite existing standard error codes **for this\r\n   command only**\r\n    - _key_ - error code\r\n    - _value_ - error description\r\n\r\n## Available Payshield commands, command specific error codes, command specific warnings\r\n\r\n### _A0 (A1)_\r\n\r\nGenerate a Key\r\n\r\n![A0 parameters](./docs/A0_generateKey.png)\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n\r\n### _A4 (A5)_\r\n\r\nForm a Key from Encrypted Components\r\n\r\n- _error codes_\r\n  - _03_: _Invalid number of components_\r\n  - _10_: _Component parity error_\r\n\r\n### _A6 (A7)_\r\n\r\nImport a Key\r\n\r\n![A6 parameters](./docs/A6_importKey.png)\r\n\r\n- _error codes_\r\n  - _10_: _ZMK Parity error_\r\n\r\n- _warnings_\r\n  - _01_: _Key parity error, advice only_\r\n\r\n### _A8 (A9)_\r\n\r\nExport a Key\r\n\r\n![A8 parameters](./docs/A8_exportKey.png)\r\n\r\n- _error codes_\r\n  - _10_: _ZMK or TMK Parity error_\r\n  - _11_: _Key parity error_\r\n\r\n### _B2 (B3)_\r\n\r\nEcho Command\r\n\r\n### _BG (BH)_\r\n\r\nTranslate a PIN and PIN Length\r\n\r\n### _BK (BL)_\r\n\r\nGenerate an IBM PIN Offset (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _03_: _Excluded PIN count incorrect_\r\n  - _10_: _TPK or ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _BS (BT)_\r\n\r\nErase the Key Change Storage\r\n\r\n### _BU (BV)_\r\n\r\nGenerate a Key Check Value\r\n\r\n- _error codes_\r\n  - _10_: _Key parity error_\r\n\r\n### _BW (BX)_\r\n\r\nTranslate Keys from Old LMK to New LMK and Migrate to New Key Type\r\n\r\n- _error codes_\r\n  - _04_: _Invalid key type code_\r\n  - _05_: _Invalid key length flag_\r\n  - _10_: _Key parity error_\r\n  - _44_: _Migration not allowed: 'Enforce key type 002 separation for PCI HSM\r\n   compliance' not set_\r\n  - _45_: _Invalid key migration destination key type_\r\n\r\n### _CA (CB)_\r\n\r\nTranslate a PIN from TPK to ZPK/BDK (3DES DUKPT) Encryption\r\n\r\n- _error codes_\r\n  - _10_: _Source TPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CC (CD)_\r\n\r\nTranslate a PIN from one ZPK to another\r\n\r\n- _error codes_\r\n  - _10_: _Source ZPK parity error_\r\n  - _11_: _Destination ZPK parity error_\r\n\r\n### _CU (CV)_\r\n\r\nVerify a PIN & Generate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _CW (CX)_\r\n\r\nGenerate a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _10_: _CVK A or CVK B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _CY (CZ)_\r\n\r\nVerify a Card Verification Code/Value\r\n\r\n- _error codes_\r\n  - _01_: _CVV failed verification_\r\n  - _10_: _CVK A or B parity error_\r\n  - _27_: _CVK not double length_\r\n\r\n### _DA (DB)_\r\n\r\nVerify a Terminal PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DC (DD)_\r\n\r\nVerify a Terminal PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _TPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _DE (DF)_\r\n\r\nGenerate an IBM PIN Offset (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _DG (DH)_\r\n\r\nGenerate an ABA PVV (of an LMK encrypted PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _DU (DV)_\r\n\r\nVerify a PIN & Generate an IBM PIN Offset (of customer selected new PIN)\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _PIN Block Key parity error_\r\n  - _11_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EA (EB)_\r\n\r\nVerify an Interchange PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EC (ED)_\r\n\r\nVerify an Interchange PIN Using the ABA PVV Method\r\n\r\n- _error codes_\r\n  - _01_: _PIN verification failure_\r\n  - _10_: _ZPK parity error_\r\n  - _11_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n\r\n### _EE (EF)_\r\n\r\nDerive a PIN Using the IBM Offset Method\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _EI (EJ)_\r\n\r\nGenerate a public/private key pair.\r\n\r\n- _error codes_\r\n  - _03_: _Invalid public key encoding type_\r\n  - _04_: _Key Length error_\r\n  - _05_: _Invalid key type_\r\n  - _06_: _Public exponent length error_\r\n  - _08_: _Supplied public exponent is even_\r\n  - _47_: _Algorithm not licensed_\r\n  - _48_: _Stronger LMK required to protect this size RSA key_\r\n  - _68_: _Command disabled_\r\n\r\n### _EW (EX)_\r\n\r\nGenerate a public/private key pair.\r\n\r\n- _error codes_\r\n  - _03_: _Invalid private key type_\r\n  - _04_: _Invalid private key flag_\r\n  - _05_: _Invalid hash identifier_\r\n  - _06_: _Invalid signature identifier_\r\n  - _07_: _Invalid pad mode identifier_\r\n  - _47_: _Algorithm not licensed_\r\n  - _68_: _Command disabled_\r\n  - _74_: _Invalid digest info syntax (no-hash mode only)_\r\n  - _76_: _Hash length error_\r\n  - _78_: _Private key length error_\r\n  - _80_: _Message length error or a standard error code._\r\n\r\n### _FM (FN)_\r\n\r\nTranslate a ZEK/ZAK from LMK to ZMK Encryption\r\n\r\n### _FW (FX)_\r\n\r\nGenerate an ABA PVV (of a customer selected PIN)\r\n\r\n- _error codes_\r\n  - _10_: _PVK parity error_\r\n  - _27_: _PVK not double length_\r\n  - _81_: _PIN length mismatch_\r\n  - _86_: _PIN exists in either global or local Excluded PIN Table_\r\n\r\n### _G0 (G1)_\r\n\r\nTranslate a PIN from BDK to BDK or ZPK Encryption (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _Interchange key parity error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GM (GN)_\r\n\r\nHash a Block of Data\r\n\r\n- _error codes_\r\n  - _05_: _Invalid hash identifier_\r\n\r\n### _GO (GP)_\r\n\r\nVerify a PIN Using the IBM Offset Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double length_\r\n  - _68_: _Command disabled_\r\n\r\n- _warnings_\r\n  - _02_: _Warning PVK not single length_\r\n\r\n### _GQ (GR)_\r\n\r\nVerify a PIN Using the ABA PVV Method (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _PIN Verification failure_\r\n  - _10_: _BDK parity error_\r\n  - _11_: _PVK error_\r\n  - _27_: _BDK not double or triple length_\r\n\r\n### _GW (GX)_\r\n\r\nGenerate/Verify a MAC (3DES DUKPT)\r\n\r\n- _error codes_\r\n  - _01_: _MAC Verification Failure_\r\n\r\n### _JA (JB)_\r\n\r\nGenerate a Random PIN\r\n\r\n- _error codes_\r\n  - _81_: _PIN length mismatch_\r\n\r\n### _JC (JD)_\r\n\r\nTranslate a PIN from TPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _TPK parity error_\r\n\r\n### _JE (JF)_\r\n\r\nTranslate a PIN from ZPK to LMK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _JG (JH)_\r\n\r\nTranslate a PIN from LMK to ZPK Encryption\r\n\r\n- _error codes_\r\n  - _10_: _ZPK parity error_\r\n\r\n### _KQ (KR)_\r\n\r\nARQC Verification and/or ARPC Generation (Using Static or MasterCard\r\n Proprietary SKD Method)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC verification failed_\r\n  - _03_: _Mode = 3 or 4 but Scheme ID ≠ 0_\r\n  - _04_: _Invalid Mode value_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Discretionary MAC verification failed_\r\n  - _10_: _MK-AC parity error_\r\n  - _11_: _MK-SMI parity error_\r\n  - _80_: _Transaction Data length error_\r\n  - _81_: _Zero length Transaction Data_\r\n  - _82_: _Invalid Discretionary MAC Data length_\r\n\r\n### _KW (KX)_\r\n\r\nARQC Verification and/or ARPC Generation (Using EMV or Cloud-Based SKD Methods)\r\n\r\n- _error codes_\r\n  - _01_: _ARQC/TC/AAC/MPVV verification failure_\r\n  - _04_: _Unrecognized Mode Flag_\r\n  - _05_: _Unrecognized Scheme ID_\r\n  - _06_: _Invalid YHHHHCC value_\r\n  - _10_: _MK parity error_\r\n  - _52_: _Invalid Branch/Height_\r\n\r\n### _LO (LP)_\r\n\r\nTranslate Decimalisation Table from Old to New LMK\r\n\r\n### _M0 (M1)_\r\n\r\nEncrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Encryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M2 (M3)_\r\n\r\nDecrypt Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M4 (M5)_\r\n\r\nTranslate Data Block\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid Output Format Flag field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Actual Message Length is too Short_\r\n  - _07_: _Invalid Destination Mode Flag Field_\r\n  - _08_: _Invalid destination Key Type Field_\r\n  - _10_: _Decryption Key Parity Error_\r\n  - _11_: _Encryption Key Parity Error_\r\n  - _15_: _Actual Message Length is too Long_\r\n  - _35_: _Illegal Message Format_\r\n\r\n### _M6 (M7)_\r\n\r\nGenerate MAC\r\n\r\n- _error codes_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _M8 (M9)_\r\n\r\nVerify MAC\r\n\r\n- _error codes_\r\n  - _01_: _MAC verification failed_\r\n  - _02_: _Invalid Mode Flag field_\r\n  - _03_: _Invalid Input Format Flag field_\r\n  - _04_: _Invalid MAC Algorithm field_\r\n  - _05_: _Invalid Key Type field_\r\n  - _06_: _Invalid Message Length field_\r\n  - _09_: _Invalid Padding Method field_\r\n  - _10_: _MAC Key Parity Error_\r\n\r\n### _PA (PB)_\r\n\r\nLoad Formatting Data to HSM\r\n\r\n### _PC (PD)_\r\n\r\nLoad Additional Formatting Data to HSM\r\n\r\n### _PE (PF, PZ)_\r\n\r\nPrint PIN/PIN and Solicitation Data\r\n\r\n- _error codes (PZ)_\r\n  - _16_: _Printer not ready/disconnected_\r\n  - _41_: _Internal hardware/software error_\r\n\r\n### _QK (QL)_\r\n\r\nTranslate Account Number for LMK-encrypted PIN\r\n\r\n### _TA (TB, TZ)_\r\n\r\nPrint TMK Mailer\r\n\r\n- _error codes (TB)_\r\n  - _10_: _TMK parity error_\r\n\r\n- _error codes (TZ)_\r\n  - _16_: _Printer time out_\r\n\r\n## Standard error codes\r\n\r\n- _10_: _Source key parity error_\r\n- _11_: _Destination key parity error or key all zeros_\r\n- _12_: _Contents of user storage not available. Reset, power-down or overwrite_\r\n- _13_: _Invalid LMK Identifier_\r\n- _14_: _PIN encrypted under LMK pair 02-03 is invalid_\r\n- _15_: _Invalid input data (invalid format, invalid characters, or not enough\r\n data provided)_\r\n- _16_: _Console or printer not ready or not connected_\r\n- _17_: _HSM not in the Authorised state, or not enabled for clear PIN output,\r\n or both_\r\n- _18_: _Document format definition not loaded_\r\n- _19_: _Specified Diebold Table is invalid_\r\n- _20_: _PIN block does not contain valid values_\r\n- _21_: _Invalid index value, or index/block count would cause an overflow condition_\r\n- _22_: _Invalid account number_\r\n- _23_: _Invalid PIN block format code_\r\n- _24_: _PIN is fewer than 4 or more than 12 digits in length_\r\n- _25_: _Decimalisation Table error_\r\n- _26_: _Invalid key scheme_\r\n- _27_: _Incompatible key length_\r\n- _28_: _Invalid key type_\r\n- _29_: _Key function not permitted_\r\n- _30_: _Invalid reference number_\r\n- _31_: _Insufficient solicitation entries for batch_\r\n- _33_: _LMK key change storage is corrupted_\r\n- _39_: _Fraud detection_\r\n- _40_: _Invalid checksum_\r\n- _41_: _Internal hardware/software error: bad RAM, invalid error codes, etc._\r\n- _42_: _DES failure_\r\n- _47_: _Algorithm not licensed_\r\n- _49_: _Private key error, report to supervisor_\r\n- _51_: _Invalid message header_\r\n- _65_: _Transaction Key Scheme set to None_\r\n- _67_: _Command not licensed_\r\n- _68_: _Command has been disabled_\r\n- _69_: _PIN block format has been disabled_\r\n- _74_: _Invalid digest info syntax (no hash mode only)_\r\n- _75_: _Single length key masquerading as double or triple length key_\r\n- _76_: _Public key length error_\r\n- _77_: _Clear data block error_\r\n- _78_: _Private key length error_\r\n- _79_: _Hash algorithm object identifier error_\r\n- _80_: _Data length error. The amount of MAC data (or other data) is greater\r\n than or less than the expected amount._\r\n- _81_: _Invalid certificate header_\r\n- _82_: _Invalid check value length_\r\n- _83_: _Key block format error_\r\n- _84_: _Key block check value error_\r\n- _85_: _Invalid OAEP Mask Generation Function_\r\n- _AB_: _Invalid number of optional blocks_\r\n- _AC_: _Optional header block error_\r\n- _AD_: _Key status optional block error_\r\n- _AE_: _Invalid start date/time_\r\n- _AF_: _Invalid end date/time_\r\n- _B0_: _Invalid encryption mode_\r\n- _B1_: _Invalid authentication mode_\r\n- _B2_: _Miscellaneous keyblock error_\r\n- _B3_: _Invalid number of optional blocks_\r\n- _B4_: _Optional block data error_\r\n- _B5_: _Incompatible components_\r\n- _B6_: _Incompatible key status optional blocks_\r\n- _B7_: _Invalid change field_\r\n- _B8_: _Invalid old value_\r\n- _B9_: _Invalid new value_\r\n- _BA_: _No key status block in the keyblock_\r\n- _BB_: _Invalid wrapping key_\r\n- _BC_: _Repeated optional block_\r\n- _BD_: _Incompatible key types_\r\n\r\n## Configuration\r\n\r\n- _headerFormat_ (string) - defines the length and data type of the\r\n message header in format _length/data type_; **NOTE: for more information\r\n of the format definitions, please refer to _ut-bitsyntax_ documentation**\r\n- _messageFormat_ (object) - may contain new command definitions, or\r\n definitions of existing commands to be overwritten, or parts of existing\r\n commands to be overwritten; **NOTE: for more information of command\r\n definitions, please refer to _Defining new commands_ above**\r\n- _maskedKeys_ (array) - request/response keys for which the values to\r\n be masked in the log records\r\n  - (string) - key for which the value will be masked in log records\r\n- _nonCorrectableFields_ (object) - each _key: value_ pair contains the\r\n following:\r\n  - _key_ - field name\r\n  - _value_ (bool) - flags if _key_ in requests should be left as it is\r\n   (_true_) or converted toUpperCase (_false_, _undefined_/not present) before\r\n   encoding\r\n","maintainers":[{"name":"kalin.krustev","email":"kalin.krustev@gmail.com"}],"time":{"modified":"2024-04-19T09:19:53.148Z","created":"2017-10-23T05:59:37.468Z","6.1.0":"2017-10-23T05:59:37.468Z","6.1.1":"2017-10-23T08:59:37.022Z","6.1.2":"2017-12-01T00:09:40.508Z","6.1.3":"2017-12-06T10:29:41.500Z","6.1.4":"2018-01-04T08:29:23.229Z","6.2.0":"2018-02-06T15:29:55.970Z","6.2.1":"2018-02-06T16:20:19.246Z","6.2.2":"2018-02-15T03:59:41.472Z","6.2.3":"2018-03-12T17:07:16.432Z","6.2.4":"2018-03-19T14:58:49.823Z","6.2.5":"2018-03-22T18:08:49.292Z","6.2.6":"2018-03-23T12:19:14.146Z","6.2.7":"2018-03-28T10:28:53.307Z","6.4.0-rc-cubalibre.0":"2018-04-03T10:38:49.255Z","6.4.0":"2018-04-17T12:49:39.510Z","6.5.0-rc-diesel.0":"2018-04-20T07:18:40.916Z","6.4.1":"2018-04-20T07:19:40.810Z","6.5.0-rc-diesel.1":"2018-05-03T11:48:42.755Z","6.5.0":"2018-07-10T13:59:50.695Z","6.5.1":"2018-08-10T12:00:07.421Z","6.6.0-rc-godfather.0":"2018-10-03T14:58:46.344Z","7.0.0-rc-dss.0":"2018-10-08T08:50:03.489Z","7.0.0-rc-dss.1":"2018-10-10T07:59:17.068Z","7.0.0-rc-dss.2":"2018-10-16T10:28:42.078Z","7.0.0-rc-dss.3":"2018-10-22T10:59:11.126Z","7.0.0-rc-dss.4":"2018-10-23T17:18:23.211Z","7.0.0-rc-dss.5":"2018-10-24T09:09:21.532Z","7.0.0-rc-dss.6":"2018-10-25T07:58:23.683Z","7.0.0-rc-dss.7":"2018-10-25T13:28:36.335Z","7.0.0-rc-dss.8":"2018-11-08T15:08:36.696Z","7.0.0-rc-dss.9":"2018-12-04T12:28:30.091Z","7.0.0-rc-dss.10":"2018-12-13T13:39:21.320Z","7.0.0-rc-dss.11":"2019-01-13T22:00:21.360Z","7.0.0-rc-dss.12":"2019-01-24T10:10:04.420Z","7.0.0-rc-dss.13":"2019-01-30T16:39:01.056Z","7.0.0-rc-dss.14":"2019-02-07T12:48:39.121Z","7.0.0-rc-dss.15":"2019-02-12T04:39:05.236Z","7.0.0-rc-dss.16":"2019-02-12T13:30:27.848Z","7.0.0-rc-dss.17":"2019-02-14T09:58:40.694Z","7.0.0-rc-dss.18":"2019-02-18T12:01:20.326Z","7.0.0-rc-dss.19":"2019-02-21T08:59:03.493Z","7.0.0-rc-dss.20":"2019-02-21T11:39:04.924Z","7.0.0-rc-dss.21":"2019-02-26T13:28:44.209Z","7.0.0-rc-dss.22":"2019-03-07T09:48:42.160Z","7.0.0-rc-dss.23":"2019-03-12T14:48:40.958Z","7.0.0-rc-dss.24":"2019-03-13T16:18:41.157Z","7.0.0-rc-dss.25":"2019-03-14T14:58:32.432Z","7.0.0-rc-dss.26":"2019-03-15T09:58:38.226Z","7.0.0-rc-dss.27":"2019-03-21T17:28:50.894Z","7.0.0-rc-dss.28":"2019-03-22T07:09:05.520Z","7.0.0-rc-dss.29":"2019-03-26T16:48:30.854Z","7.0.0-rc-dss.30":"2019-04-01T09:00:05.042Z","7.0.0-rc-dss.31":"2019-04-15T14:39:39.246Z","7.0.0-rc-dss.32":"2019-04-16T10:48:48.270Z","7.0.0-rc-dss.33":"2019-04-17T14:28:43.674Z","7.0.0-rc-dss.34":"2019-05-28T11:32:09.605Z","7.0.0-rc-dss.35":"2019-05-30T14:58:27.791Z","7.0.0-rc-dss.36":"2019-08-08T08:08:31.226Z","7.0.0-rc-dss.37":"2019-08-08T08:58:34.990Z","7.0.0":"2019-09-26T13:30:05.447Z","7.0.1":"2019-09-27T13:29:48.548Z","7.1.0":"2019-11-06T09:09:36.574Z","6.5.3-accu.0":"2019-11-22T03:38:04.160Z","7.1.1":"2020-01-15T10:09:40.240Z","7.1.2":"2020-01-17T07:03:06.449Z","7.1.3":"2020-01-17T12:23:43.080Z","7.1.4":"2020-01-17T12:57:21.658Z","7.1.5":"2020-02-24T14:47:21.258Z","7.1.6":"2020-04-09T09:04:30.173Z","7.1.7":"2020-04-27T07:33:40.984Z","7.2.0":"2021-03-31T15:47:11.795Z","7.2.1":"2021-06-15T14:14:12.601Z","7.2.2":"2022-06-03T11:08:01.096Z","7.3.0":"2023-08-07T10:23:33.081Z","8.0.0-keyBlock.0":"2023-09-04T16:16:56.398Z","8.0.0-keyBlock.1":"2023-09-05T14:34:43.660Z","8.0.0":"2024-04-19T09:19:52.962Z"},"homepage":"https://github.com/softwaregroup-bg/ut-codec-payshield#readme","repository":{"type":"git","url":"git+ssh://git@github.com/softwaregroup-bg/ut-codec-payshield.git"},"bugs":{"url":"https://github.com/softwaregroup-bg/ut-codec-payshield/issues"},"license":"Apache-2.0","readmeFilename":"README.md"}