Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在python中,您可以将字符串编码为
encoded = text.encode('hex') text = encoded.decode('hex')
php中对应的函数有哪些?
您可以使用
$data = bin2hex("your string"); $string = hex2bin($data);
或者
$data = implode('', unpack("H*", "your string")); $string = pack("H*", $data);