com.tosan.tools.mask.starter.business.LeftValueMasker Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tosan-mask-spring-boot-starter Show documentation
Show all versions of tosan-mask-spring-boot-starter Show documentation
This project provides a spring boot starter that provides masking sensitive data in JSON string functionality.
The newest version!
package com.tosan.tools.mask.starter.business;
import com.tosan.tools.mask.starter.business.enumeration.MaskType;
/**
* @author M.khoshnevisan
* @since 4/21/2021
*/
public class LeftValueMasker implements ValueMasker {
@Override
public MaskType getType() {
return MaskType.LEFT;
}
@Override
public String mask(String parameterPlainValue) {
String leftEncryptedValue = parameterPlainValue;
if (parameterPlainValue != null && parameterPlainValue.length() >= 2) {
leftEncryptedValue = SEMI_ENCRYPTED.concat(parameterPlainValue.substring(parameterPlainValue.length() / 2));
}
return leftEncryptedValue;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy