diff --git a/aes.module b/aes.module index 1e62f51..03868fb 100755 --- a/aes.module +++ b/aes.module @@ -691,16 +691,16 @@ The decrypted string on success, false on error. */ function aes_decrypt($string, $base64encoded = true, $custom_key = null, $custom_cipher = null, $custom_iv = null, $custom_implementation = null) { + if ($base64encoded) { + $string = base64_decode($string); + } + //bail out if the passed string is empty if(empty($string)) { watchdog("aes", "Tried to decrypt an empty string.", array(), WATCHDOG_WARNING); return false; } - if ($base64encoded) { - $string = base64_decode($string); - } - if ($custom_cipher != null) { $cipher = $custom_cipher; }