MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / encode_base64

Function encode_base64

tools/python-3.11.9-amd64/Lib/email/encoders.py:25–33  ·  view source on GitHub ↗

Encode the message's payload in Base64. Also, add an appropriate Content-Transfer-Encoding header.

(msg)

Source from the content-addressed store, hash-verified

23
24
25def encode_base64(msg):
26 """Encode the message's payload in Base64.
27
28 Also, add an appropriate Content-Transfer-Encoding header.
29 """
30 orig = msg.get_payload(decode=True)
31 encdata = str(_bencode(orig), 'ascii')
32 msg.set_payload(encdata)
33 msg['Content-Transfer-Encoding'] = 'base64'
34
35
36def encode_quopri(msg):

Callers 1

authMethod · 0.85

Calls 3

strFunction · 0.85
get_payloadMethod · 0.80
set_payloadMethod · 0.80

Tested by

no test coverage detected