<?php $mcrypt_key = 'hoge'; #3DESã®è¦å®ãã¼é·ããçã $plaintext = 'ããããã'; #ãã«ããã¤ãæå $td = mcrypt_module_open(MCRYPT_TRIPLEDES, '', MCRYPT_MODE_ECB, ''); $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND); mcrypt_generic_init($td, $mcrypt_key, $iv); $ciphertext = mcrypt_generic($td, $plaintext); # 表示ã®é¢ä¿ä¸base64ã¨ã³ã³ã¼ã echo base64_encode($ciphertext);
{{#tags}}- {{label}}
{{/tags}}