HSM Kit
v0.1.0Local-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.
| Parameter | Type | Description |
|---|---|---|
payload * | string | Digits without the final check digit |
luhn_validate
Validate a complete number using the Luhn (Mod 10) algorithm.
| Parameter | Type | Description |
|---|---|---|
value * | string | Complete digits including the check digit |
xor_key_components
XOR equal-length hexadecimal key components for synthetic interoperability tests.
| Parameter | Type | Description |
|---|---|---|
components * | array | Two 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.
| Parameter | Type | Description |
|---|---|---|
pan * | string | Synthetic PAN containing 13 to 19 digits |
pin * | string | Synthetic PIN containing 4 to 12 digits |
base64_encode
Encode UTF-8 text as standard Base64.
| Parameter | Type | Description |
|---|---|---|
text * | string |
base64_decode
Decode standard Base64 into UTF-8 text.
| Parameter | Type | Description |
|---|---|---|
base64 * | string |