HSM Kit

v0.1.0
io.github.hsm-kit/hsmkit Checked 2 days ago Published 2 months ago

Local-first Base64, Luhn, key-component XOR, and synthetic ISO-0 PIN block tools.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

luhn_calculate_check_digit

Calculate the Luhn (Mod 10) check digit for a digits-only payload.

ParameterTypeDescription
payload *stringDigits without the final check digit

luhn_validate

Validate a complete number using the Luhn (Mod 10) algorithm.

ParameterTypeDescription
value *stringComplete digits including the check digit

xor_key_components

XOR equal-length hexadecimal key components for synthetic interoperability tests.

ParameterTypeDescription
components *arrayTwo or more equal-length hexadecimal values

iso0_pin_block

Generate an ISO 9564-1 format 0 clear PIN block from synthetic PIN and PAN test data.

ParameterTypeDescription
pan *stringSynthetic PAN containing 13 to 19 digits
pin *stringSynthetic PIN containing 4 to 12 digits

base64_encode

Encode UTF-8 text as standard Base64.

ParameterTypeDescription
text *string

base64_decode

Decode standard Base64 into UTF-8 text.

ParameterTypeDescription
base64 *string