我有这个存储过程:
CREATE PROCEDURE get_mysql_user_pass(
IN user_type VARCHAR(16),
IN aes_passphrase VARCHAR(255),
OUT mysql_user VARCHAR(16),
OUT mysql_pass VARCHAR(32),
)
READS SQL DATA
SQL SECURITY INVOKER
BEGIN
DECLARE aes_key VARCHAR(255);
SET @aes_key = SHA1(aes_passphrase);
SELECT
AES_DECRYPT(user_column,@aes_key),
AES_DECRYPT(pass_column,@aes_key)
INTO
mysql_user, mysql_pass
FROM my_table
WHERE my_column = user_type;
END;
如果我使用像“hosi654dl25lkjdfwhatever”这样的alpha_numeric作为mysql_pass一切正常,但如果我有类似这样的东西“rIμ°uþÁYfM09ÃÁôQÇOÅ°jýμàÈWfYf¡½4”,因为mysql_pass返回像“rIÂμ°uþÃYfM09ÃÃÔQÇOÃ...°jýÂμÃ的抓取字符串ÃWfYf¡½4" 。
我从PHP中调用它