About 90,200 results
Open links in new tab
  1. How to encode text to base64 in python - Stack Overflow

    The bytes function creates a bytes object from the string "your_string" using UTF-8 encoding. In Python, bytes represents a sequence of bits and UTF-8 specifies the character encoding to use. The …

  2. python - Why do I need 'b' to encode a string with Base64 ... - Stack ...

    362 base64 encoding takes 8-bit binary byte data and encodes it uses only the characters A-Z, a-z, 0-9, +, / * so it can be transmitted over channels that do not preserve all 8-bits of data, such as email. …

  3. How do you decode Base64 data in Python? - Stack Overflow

    Jul 19, 2021 · I have the following piece of Base64 encoded data, and I want to use the Python Base64 module to extract information from it. It seems that module does not work. How can I make it work?

  4. python - Encoding an image file with base64 - Stack Overflow

    Feb 1, 2015 · I want to encode an image into a string using the base64 module. I've ran into a problem though. How do I specify the image I want to be encoded? I tried using the directory to the image, but …

  5. python - Base64 encoding in python3 - Stack Overflow

    LookupError: 'base64' is not a text encoding; use codecs.encode() to handle arbitrary codecs This line seemed to work fine in python 2 but since switching to 3 I get the error

  6. Base64 Authentication Python - Stack Overflow

    Aug 9, 2013 · I'm following an API and I need to use a Base64 authentication of my User Id and password. 'User ID and Password need to both be concatenated and then Base64 encoded' it then …

  7. Convert file to base64 string on Python 3 - Stack Overflow

    Convert file to base64 string on Python 3 Asked 9 years, 9 months ago Modified 3 years, 8 months ago Viewed 41k times

  8. How to encode a image in Python to Base64? - Stack Overflow

    Dec 3, 2019 · You can not base64 encode the image without reading it to memory. So base64.b64encode(img_file.read()).decode('utf-8') should be your solution. What is img in your first …

  9. How to decode base64 url in Python? - Stack Overflow

    In python there is base64.b64encode but that only base64 encodes and its is different from base64 url encoding. Here is the right set to of steps to convert form base64encoded to base64urlencoded string:

  10. Check if a string is encoded in base64 using Python

    Dec 1, 2019 · I was looking for a solution to the same problem, then a very simple one just struck me in the head. All you need to do is decode, then re-encode. If the re-encoded string is equal to the …