You are here

function aes_get_password in AES encryption 5

Same name and namespace in other branches
  1. 6 aes.module \aes_get_password()
  2. 7 aes.module \aes_get_password()
1 call to aes_get_password()
aes_user in ./aes.module
1 string reference to 'aes_get_password'
aes_menu in ./aes.module

File

./aes.module, line 311

Code

function aes_get_password($uid, $decrypt = false) {
  $result = db_query("SELECT pass FROM {aes_passwords} WHERE uid=%d", $uid);
  $user = db_fetch_array($result);
  if ($user === false) {
    return false;
  }
  else {
    if ($decrypt) {
      return trim(aes_decrypt($user['pass']));
    }
    else {
      return $user['pass'];
    }
  }
}