mcrypt関数でデータを暗号化→復号化した時に、末尾にデータが付加されて元に戻らない場合がある、という事で簡単に実験。 サンプルのテキストファイルを作成する。 $ echo -n 'encrypt-me' > before.txt 中身を確認 $ cat before.txt encrypt-me サンプルのテキストファイルをmcrypt関数で暗号化して復号化し、別のファイルへ出力するPHPを作成する。 $text = file_get_contents('before.txt'); // 暗号化したいデータ $key = 'secret_key'; $cipher = MCRYPT_RIJ…