toolbox.security.helper
Class MaskingHelper

Package class diagram package MaskingHelper
java.lang.Object
  extended by toolbox.security.helper.MaskingHelper

public class MaskingHelper
extends java.lang.Object

Helper class to perform simple String masking.

This class can perform three types of masking operations:


Constructor Summary
MaskingHelper()
          Default constructor
 
Method Summary
 java.lang.String maskAll(java.lang.String input, java.lang.String maskChar)
          Mask the whole input string.
 java.lang.String maskFirst(java.lang.String input, java.lang.String maskChar, int count)
          Mask the first N characters of the given input string.
 java.lang.String maskLast(java.lang.String input, java.lang.String maskChar, int count)
          Mask the last N characters of the given input string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaskingHelper

public MaskingHelper()
Default constructor

Method Detail

maskFirst

public java.lang.String maskFirst(java.lang.String input,
                                  java.lang.String maskChar,
                                  int count)
Mask the first N characters of the given input string.

Parameters:
input - String containing the data that must be masked.
maskChar - String containing the masking character.
count - An int indicating the character count.
Returns:
String containing the masked data.

maskLast

public java.lang.String maskLast(java.lang.String input,
                                 java.lang.String maskChar,
                                 int count)
Mask the last N characters of the given input string.

Parameters:
input - String containing the data that must be masked.
maskChar - String containing the masking character.
count - An int indicating the character count.
Returns:
String containing the masked data.

maskAll

public java.lang.String maskAll(java.lang.String input,
                                java.lang.String maskChar)
Mask the whole input string.

Parameters:
input - String containing the data that must be masked.
maskChar - String containing the masking character.
Returns:
String containing the masked data.