- 함수 hex2bin()
1 PHP[ | ]

PHP
Copy
var_dump( hex2bin('6578616d706c65206865782064617461') );
var_dump( hex2bin('123456abcdef') );
# string(16) "example hex data"
# string(6) "�4V«ί"
2 Python[ | ]

Python
Copy
print '6578616d706c65206865782064617461'.decode('hex')
print '123456abcdef'.decode('hex')
# example hex data
# �4V«ί
Python
Copy
import binascii
print binascii.unhexlify('6578616d706c65206865782064617461')
print binascii.unhexlify('123456abcdef')
# example hex data
# �4V«ί