org.aeonbits.owner.crypto.AbstractDecryptor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of owner Show documentation
Show all versions of owner Show documentation
Get rid of the boilerplate code in Java properties based configuration.
package org.aeonbits.owner.crypto;
/**
* An abstract implementation of Decryptor.
* It implements the decrypt( String, String ).
*/
public abstract class AbstractDecryptor
implements Decryptor {
@Override
public String decrypt( String value, String defaultValue ) {
try {
return this.decrypt( value );
} catch ( IllegalArgumentException cause ) {
return defaultValue;
}
}
}