if ( encryptedString == null || encryptedString.trim().length() <= 0 )
throw new IllegalArgumentException( "encrypted string was null or empty" );
try
{
SecretKey key = keyFactory.generateSecret( keySpec );
cipher.init( Cipher.DECRYPT_MODE, key );
byte[] cleartext = Base64.decode( encryptedString );
byte[] ciphertext = cipher.doFinal( cleartext );
return bytes2String( ciphertext );
}
catch (Exception e)
{
throw new EncryptionException( e );
}