* if last argument is throwable/exception, pass it as argument to logger.
* @param format message format can contains text and {}
* @param arguments output arguments
- * @return
+ * @return the formatted message as a String
*/
public static String formatMessage(String format, Object...arguments) {
if (arguments.length <= 0 || arguments[0] == null) {
/**
* CryptoUtils - encryption tool constructor.
* @param secretKeySpec
- * AES supports 128, 192 or 256-bit long key size, it can be plain text or generated with key generator
+ * AES supports 128, 192 or 256-bit long key size, it can be plain text or generated with key generator
*/
public CryptoUtils(SecretKeySpec secretKeySpec) {
this.secretKeySpec = secretKeySpec;
* <p>Final result is to put in properties file is: IV + Outcome of openssl command
*
* @param value
- * The plain text string
+ * The plain text string
* @return The encrypted String
*/
@Override
/**
* Encrypt a value based on the Policy Encryption Key.
* @param value
- * The plain text string
+ * The plain text string
* @param secretKey
- * The secret key
+ * The secret key
* @return The encrypted String
*/
public static String encrypt(String value, String secretKey) {
* -K PrivateHexKey -iv 16BytesIVFromEncryptedString
*
* @param value
- * The encrypted string that must be decrypted using the Policy Encryption Key
+ * The encrypted string that must be decrypted using the Policy Encryption Key
* @return The String decrypted if string begin with 'enc:'
*/
@Override
* Decrypt a value based on the Policy Encryption Key if string begin with 'enc:'.
*
* @param value
- * The encrypted string that must be decrypted using the Policy Encryption Key
+ * The encrypted string that must be decrypted using the Policy Encryption Key
* @param secretKey
- * The secret key
+ * The secret key
* @return The String decrypted if string begin with 'enc:'
*/
public static String decrypt(String value, String secretKey) {
* Check if string is encrypted by verify if string prefix with 'enc:'.
*
* @param value
- * The encrypted string or plain text value
+ * The encrypted string or plain text value
* @return boolean value indicate if string prefix with enc: or not
*/
public static boolean isEncrypted(String value) {