Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 373 Bytes

encoding_decoding.md

File metadata and controls

19 lines (14 loc) · 373 Bytes

Cheatsheet: Encoding & Decoding

Python

char to hex

‘l’.encode(‘hex’) == ‘6c’

hex to char

'6c'.decode('hex') == ‘l’

char to int

ord(‘l’) == 108

int to char

chr(108) == ‘l’

hex to int

int('21',16)

Alternative tools

use cyberchef (docker pull cyberchef/cyberchef)