This file contains hidden or 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
<?php | |
// AES-256과 HMAC을 사용하여 문자열을 암호화하고 위변조를 방지하는 법. | |
// 비밀번호는 서버만 알고 있어야 한다. 절대 클라이언트에게 전송해서는 안된다. | |
// PHP 5.2 이상, mcrypt 모듈이 필요하다. | |
// 문자열을 암호화한다. | |
function aes_encrypt($plaintext, $password) | |
{ |
NewerOlder