Class Mask
Utility to mask sensitive data.
Methods summary
public static
string
|
#
hide( string $value, integer $maxUnmaskedChars = 0 )
Completely mask a value.
Parameters
- $value
- Value to mask.
- $maxUnmaskedChars
- Keep at most N characters unmasked.
Returns
string
|
public static
string
|
#
email( string $email, integer $userMaxUnmaskedChars = 3, boolean $maskDomain = false )
Mask email.
Parameters
- $email
- Value to mask.
- $userMaxUnmaskedChars
- Keep at most N characters unmasked for the username.
- $maskDomain
- Set to
true to mask domain part.
Returns
string
|