Expand description
CRC16 validation and other validation utilities for PIX BR Code
Constants§
- CRC16
- CRC16 calculator for EMV QRCPS compliance (CRC-16/CCITT-FALSE) Using the standard CRC-16 polynomial 0x1021 with initial value 0xFFFF
Functions§
- calculate_
crc16 - Calculate CRC16 checksum for a BR Code payload
- validate_
country_ code - Validate country code (should be “BR”)
- validate_
crc16 - Validate CRC16 checksum of a BR Code string
- validate_
currency - Validate currency code (should be “986” for BRL)
- validate_
gui - Validate GUI field (should be “br.gov.bcb.pix”)
- validate_
merchant_ city - Validate merchant city format
- validate_
merchant_ name - Validate merchant name format
- validate_
payload_ format - Validate payload format indicator (should be “01”)
- validate_
pix_ key - Validate PIX key format
- validate_
transaction_ amount - Validate transaction amount format