WeCodeAcademy

Encoding Is Not Encryption

A frequent and costly mistake: treating encoding as protection. Base64, URL encoding and hex only change the format of data so it travels safely; they use no secret, and anyone can reverse them in one line. Seeing a string like cGFzc3dvcmQ= in a config file means the password is effectively in plain sight.

IdeaPurposeNeeds a key?Reversible by anyone?
EncodingFormat dataNoYes
HashingFingerprintNoNo (one way)
EncryptionSecrecyYesOnly with the key
Examplepython
Open in editor »
Quick check

Is Base64 a way to keep a password secret?

Your turn: write the code

Decode this Base64 value and print the text: c2VjdXJpdHkgaXMgZXZlcnlvbmUncyBqb2I=

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.