Created
August 27, 2010 14:53
-
-
Save nissuk/553507 to your computer and use it in GitHub Desktop.
CakePHPアプリケーション固有のパスワードを生成して返すストアドファンクション
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
CREATE FUNCTION `apppass`(s TEXT) RETURNS text CHARSET utf8 | |
COMMENT 'CakePHPアプリケーション固有のパスワードを生成して返します' | |
BEGIN | |
DECLARE salt TEXT DEFAULT '{Security.Saltの値}'; | |
RETURN SHA1(CONCAT(salt, s)); | |
END$$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment