Convert hex to ascii characters

前端 未结 5 1065
攒了一身酷
攒了一身酷 2020-12-03 15:12

Is it possible to represent a sequence of hex characters (0-9A-F) with a sequence of 0-9a-zA-Z characters, so the the result sequence is smaller and can be decoded?

5条回答
  •  自闭症患者
    2020-12-03 15:35

    The built-in php functions may help some landing here on a search:

    // https://www.php.net/manual/en/function.hex2bin
    $hex = '6578616d706c65206865782064617461';
    echo hex2bin($hex); // example hex data
    

提交回复
热议问题