In brief
base64.b64encode(b'cat') gives b'Y2F0'. Decoding restores the bytes without requiring a secret key.
Useful to know
base64.b64encode(b'cat') gives b'Y2F0'. Decoding restores the bytes without requiring a secret key. [1]
Encoding is useful for transport through text formats, but increases size. It does not make a password or document confidential. Limit the size of incoming Base64 data and validate its format against the protocol rather than assuming every decoded result is safe content.
Sources
For further detail and to check the information: