PHP » PYTHON |
login |
register |
about
|
#Python 2.x: result = myStr.encode('hex') #Function def bin2hex(binn): import string sonuc = binn.encode('hex') return sonuc #exapmle 2.x func; print bin2hex("fatihmert") #result -> 66617469686d657274 #Python 3.x: import binascii result = binascii.hexlify(data) bin2hex(PHP 4, PHP 5) bin2hex — Convert binary data into hexadecimal representation Description
string bin2hex
( string $str
)
Returns an ASCII string containing the hexadecimal representation of str . The conversion is done byte-wise with the high-nibble first. Parameters
Return ValuesReturns the hexadecimal representation of the given string. |
more
Recently updated
more
Most requested
|