Skip to content

Instantly share code, notes, and snippets.

@nissuk
Created August 27, 2010 14:53
Show Gist options
  • Save nissuk/553507 to your computer and use it in GitHub Desktop.
Save nissuk/553507 to your computer and use it in GitHub Desktop.
CakePHPアプリケーション固有のパスワードを生成して返すストアドファンクション
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