private static boolean isValidEncryptionAlgorithm(String algorithm){
  return (algorithm.equals(TRIPLEDES) || algorithm.equals(AES_128) || algorithm.equals(AES_256)|| algorithm.equals(AES_192)|| algorithm.equals(AES_128_GCM)|| algorithm.equals(AES_192_GCM)|| algorithm.equals(AES_256_GCM)|| algorithm.equals(RSA_v1dot5)|| algorithm.equals(RSA_OAEP)|| algorithm.equals(RSA_OAEP_11)|| algorithm.equals(TRIPLEDES_KeyWrap)|| algorithm.equals(AES_128_KeyWrap)|| algorithm.equals(AES_256_KeyWrap)|| algorithm.equals(AES_192_KeyWrap));
}

private static boolean isValidEncryptionAlgorithm ( String algorithm ) { return ( algorithm . equals ( TRIPLEDES ) || algorithm . equals ( AES_128 ) || algorithm . equals ( AES_256 ) || algorithm . equals ( AES_192 ) || algorithm . equals ( AES_128_GCM ) || algorithm . equals ( AES_192_GCM ) || algorithm . equals ( AES_256_GCM ) || algorithm . equals ( RSA_v1dot5 ) || algorithm . equals ( RSA_OAEP ) || algorithm . equals ( RSA_OAEP_11 ) || algorithm . equals ( TRIPLEDES_KeyWrap ) || algorithm . equals ( AES_128_KeyWrap ) || algorithm . equals ( AES_256_KeyWrap ) || algorithm . equals ( AES_192_KeyWrap ) ) ; }
checks to ensure that the supplied algorithm is valid .
