tckn_maskedIdentity

Mock Jutsu HOW-TO | UK

In the modern software development lifecycle, protecting sensitive information is paramount to maintaining user trust and legal standing. The mock-jutsu library addresses this challenge by providing robust tools for generating realistic mock data that mirrors real-world structures without compromising security. Specifically, the tckn_masked function is designed for developers working with Turkish Identity Numbers (T.C. Kimlik No) who must maintain strict compliance with data protection regulations such as KVKK and GDPR. By generating a masked version of this 11-digit identifier, the library ensures that teams can build and test systems without ever handling genuine personally identifiable information.

The tckn_masked function generates strings that follow the standard Turkish ID format but apply a strategic masking pattern, typically appearing as "***123456**". While a full, valid TCKN is governed by a complex checksum algorithm—where the final two digits are calculated based on the preceding nine—this masked variant focuses on visual and structural representation for privacy-first environments. This allows QA engineers and backend developers to populate user interfaces and databases with test data that looks authentic, ensuring that frontend layouts, data grids, and report templates remain consistent without the risks associated with a data breach.

Integrating tckn_masked into a professional workflow is seamless across various technical environments. Whether you are using the Python API via jutsu.generate('tckn_masked'), executing a quick command through the mock-jutsu CLI, or conducting high-load performance testing in JMeter, the function provides instant, high-quality test data. This is particularly beneficial for testing search filters, profile dashboards, and administrative panels where an ID number must be present but obscured. It effectively eliminates the overhead of manually creating anonymised datasets, significantly accelerating the development sprint and reducing the likelihood of human error during data preparation.

The primary advantage of using mock-jutsu for this purpose is the perfect balance between utility and security. It empowers engineering teams to perform comprehensive end-to-end testing with confidence, knowing that no real-world identities are being processed in staging or development environments. By automating the creation of tckn_masked values, developers can focus on core application logic and performance rather than tedious data sanitisation. This utility makes mock-jutsu an essential component of any modern testing toolkit, bridging the gap between functional requirements and strict global privacy compliance standards.

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

Parameters

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

Other Languages