# DataMasking routines

Available in...

* Big Data Platform
* Cloud API Services Platform
* Cloud Big Data Platform
* Cloud Data Fabric
* Cloud Data Management Platform
* Data Fabric
* Data Management Platform
* Data Services Platform
* Qlik Talend Cloud Enterprise Edition
* Qlik Talend Cloud Premium Edition
* Real-Time Big Data Platform

DataMasking routines are portions of code that perform masking on your data. You can use them in the settings of several components in a Talend Job.

To access the functions, in the Repository tree view, go to Code &gt; Global routines &gt; system and double-click DataMasking.

Description and syntax of DataMasking routinesDescription and syntax of DataMaskingDataMasking routines

| Routine | Description | Syntax |
| --- | --- | --- |
| maskCreditCardNumber | Masks a 16-digit credit card number with a defined<br>character from the 5th to the 12th place. | DataMasking.maskCreditCardNumber (masks a credit card<br>number) |
| createRandomString(int<br>valueLength) | Creates a random String of defined length. | DataMasking.createRandomString (for example: DataMasking.createRandomString(5) gives<br>1auA5, 11uyd or A1c8j) |
| blurNumber | Adds a random value from a certain range to a numeric<br>value. | DataMasking.blurNumber (masks numeric values) |
| setDefaultValue | Returns a default value as String. | DataMasking.<br>setDefaultValue (replaces the string<br>to be masked by a given default value) |
| createIPAdress | Creates a random IP address. | DataMasking.createIPAdress (masks IP address) |
| createIPAdressKeepDomain | Creates a random IP address and keeps the domain<br>part of the address. | DataMasking.createIPAdressKeepDomain (masks IP address<br>except for the domain name) |
| createRandomDate (fromYear,toYear) | Returns a random date as String in the specified<br>time range. For example, createRandomDate(1900,2016) should return random dates<br>between the years from 1900 to 2016. | DataMasking.<br>createRandomDate (masks a<br>date) |
| Availability-note[Deprecated](https://help.talend.com/r/en-US/Cloud/labels-on-talend-help-center/availability-deprecated)<br><br>This content is deprecated.<br><br>createMD5 | Calculates MD5 hash value from String.<br><br>Information noteRestriction: Use this routine only for migration. | DataMasking.createMD5 (masks a string with<br>MD5) |