Encrypted PIN working-key data carried in card authorization payloads.
The pinned schema requires string fields key, kvc and iv and forbids
additional fields. This codec validates JSON shape without imposing hex/length
constraints, checking key values, decrypting material or encrypting a PIN block.
Inspection omits all fields. Explicit to_map/1 and JSON encoding include the
sensitive protocol values. Errors identify fields without retaining values.
Validate manually constructed or modified structs with validate/1;
to_map/1 converts shape without validating it.
Summary
Functions
Decodes and validates the encrypted PIN working-key JSON object.
Converts to protocol fields, including encrypted key data, without validating.
Validates the typed fields without performing cryptographic operations.
Types
Functions
@spec from_map(map()) :: {:ok, t()} | {:error, OpenPayments.Error.t()}
Decodes and validates the encrypted PIN working-key JSON object.
Converts to protocol fields, including encrypted key data, without validating.
@spec validate(t()) :: :ok | {:error, OpenPayments.Error.t()}
Validates the typed fields without performing cryptographic operations.