0
笨AES解碼我tryed:示出奇怪字符
$data = array('ip'=>'120.0.3.4','user'=>'robert');
$this->load->library('encrypt');
$this->encrypt->set_cipher(MCRYPT_RIJNDAEL_256);
$this->encrypt->set_mode(MCRYPT_MODE_ECB);
$key = random_string();
$o=$this->encrypt->encode($data,$key);
var_dump($o);
$this->encrypt->set_cipher(MCRYPT_RIJNDAEL_256);
$this->encrypt->set_mode(MCRYPT_MODE_ECB);
$o = $this->encrypt->decode($o,$key);
var_dump($o);
它retunrs在解碼奇怪字符:
string(44) "CVwMzZGkzagW4wHbUZfNpVWACQp2Fx4TeAO2KLqZs3I=" string(32) "��pz��xJx�jʊ8�Kw��mS�Y �1�_�"
任何建議?
這是由陣列加密引起的?我需要通過值來加密值,而不是加密所有數組以使用加密數據數組? thx