All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ingenico.direct.logging.ValueObfuscator Maven / Gradle / Ivy

package com.ingenico.direct.logging;

public class ValueObfuscator {

    public static final ValueObfuscator INSTANCE = new ValueObfuscator();

    protected ValueObfuscator() { }

    /**
     * @return "*" followed by the length of the given value, or null/empty if the value is null/empty, eg. "abc" returns "*3".
     */
    String obfuscateValue(String value) {
        return value == null || value.isEmpty()
                ? value
                : "*" + value.length();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy