Skip to playerSkip to main content
  • 7 years ago
In this video, we demonstrate how one would go about converting a hexadecimal byte string into a base64 byte string in Python. There is also a brief review of what ASCII is. Like, subscribe, and comment.

"Always operate on raw bytes, never on encoded strings. Only use hex and base64 for pretty-printing."

# Convert hex to base64

x="49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7\573206d757368726f6f6d"

should convert to

y="SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t"




-Seneca the Younger
Be the first to comment
Add your comment

Recommended