Skip to main content
iso8583sim.core.emv This module provides functions for parsing and building EMV Tag-Length-Value encoded data, commonly found in ISO 8583 Field 55.

Functions

parse_emv_data()

Parse EMV TLV data into a dictionary of tags and values. Parameters
str
required
Hex-encoded EMV TLV data
dict[str, str]
Dictionary mapping tag strings to value strings (hex-encoded)
Raises
  • ValueError: If data is malformed

build_emv_data()

Build EMV TLV data from a dictionary of tags and values. Parameters
dict[str, str]
required
Dictionary mapping tag strings to value strings (hex-encoded)
str
Hex-encoded EMV TLV data string

get_tag_name()

Get the description of an EMV tag. Parameters
str
required
Tag identifier (hex string)
str
Description of the tag, or “Unknown” if not found

explain_tvr()

Explain Terminal Verification Results. Parameters
str
required
5-byte TVR as hex string (10 characters)
list[str]
List of issues/flags that are set

explain_cid()

Explain Cryptogram Information Data. Parameters
str
required
CID byte as hex string
str
Description of the cryptogram type