/** * Get the auth (safe) stored password from (in-memory) * * @return STRING :: The plain password if was set or empty string */ public static function get_login_password() { //-- if ((string) self::$AuthData['USER_LOGIN_PASS'] == '') { return ''; // empty pass } else { return (string) SmartCipherCrypto::decrypt('hash/sha1', (string) self::$AuthData['KEY'], (string) self::$AuthData['USER_LOGIN_PASS']); } // end if else //-- }
public static function crypto_decrypt($y_data, $y_key = '') { //-- if ((string) $y_key == '') { $key = (string) SMART_FRAMEWORK_SECURITY_KEY; } else { $key = (string) $y_key; } //end if //-- $cipher = 'hash/sha256'; // default if (defined('SMART_FRAMEWORK_SECURITY_CRYPTO')) { $cipher = (string) SMART_FRAMEWORK_SECURITY_CRYPTO; } //end if //-- return (string) SmartCipherCrypto::decrypt((string) $cipher, (string) $key, (string) $y_data); //-- }