mrz_td1MRZ

Mock Jutsu HOW-TO | UK

The mrz_td1 function is a specialised utility within the mock-jutsu library designed to generate realistic Machine Readable Zone (MRZ) strings for TD1 format identity cards. Adhering strictly to the ICAO 9303 Part 5 standard, this tool produces the characteristic three-line format, with each line containing precisely thirty characters. Developers requiring high-quality mock data for identity verification systems can leverage this function to simulate the complex data structures found on modern national ID cards and residency permits without the need for manual string construction or complex algorithmic implementation.

At its core, the mrz_td1 generator handles the intricate checksum calculations required for international compliance. It populates essential fields including the document number, date of birth, and expiry date, while automatically computing the composite check digit. This ensures that the generated test data passes validation logic in Optical Character Recognition (OCR) software and backend verification APIs. By using mock-jutsu, engineers can ensure their systems are robust enough to handle various international naming conventions and date formats while maintaining the structural integrity mandated by global aviation and security standards.

Incorporating mrz_td1 into your workflow is seamless, whether you are working in a Python environment, executing command-line tasks, or conducting performance testing via JMeter. This versatility makes it an indispensable asset for Quality Assurance teams testing Know Your Customer (KYC) onboarding flows or border management software. Using synthetic mock data instead of real sensitive information significantly reduces the risk of data breaches during the development lifecycle, ensuring that privacy regulations are upheld while maintaining high testing coverage and operational security across the entire software delivery pipeline.

Beyond simple data generation, the mrz_td1 function empowers developers to stress-test their systems against diverse edge cases. By generating a wide range of test data, teams can verify how their applications handle different nationalities, document types, and expiration scenarios. The efficiency of mock-jutsu allows for the rapid creation of thousands of unique records, facilitating large-scale load testing and ensuring that identity processing pipelines remain performant under pressure. This combination of standard-compliant accuracy and ease of use makes it a premier choice for modern software engineering teams building secure identity solutions.

CLI Usage
mockjutsu generate mrz_td1mockjutsu bulk mrz_td1 --count 10mockjutsu export mrz_td1 --count 10 --format jsonmockjutsu export mrz_td1 --count 10 --format csvmockjutsu export mrz_td1 --count 10 --format sql# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate mrz_td1 --maskmockjutsu bulk mrz_td1 --count 5 --mask
Python API
from mockjutsu import jutsujutsu.generate('mrz_td1')jutsu.bulk('mrz_td1', count=10)jutsu.template(['mrz_td1'], count=5)# mask=True: regulation-compliant outputjutsu.generate('mrz_td1', mask=True)jutsu.bulk('mrz_td1', count=5, mask=True)
JMeter
${__mockjutsu_mrz(mrz_td1)}# JMeter Function: __mockjutsu_mrz# Parameter 1: mrz_td1# Parameter 2: (not required for this function)# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_mrz(mrz_td1,mask)}
REST API
GET /generate/mrz_td1# → {"type":"mrz_td1","result":"...","status":"ok"}GET /bulk/mrz_td1?count=10POST /template {"types":["mrz_td1"],"count":1}# mask=true: regulation-compliant outputGET /generate/mrz_td1?mask=trueGET /bulk/mrz_td1?count=5&mask=true

Parameters

Parameter Values Description
--mask true | false Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…)

Other Languages