MCPcopy Index your code
hub / github.com/python/cpython / encode_base64

Function encode_base64

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 2

authMethod · 0.85
test_smtplib.pyFile · 0.85

Calls 3

strFunction · 0.85
get_payloadMethod · 0.80
set_payloadMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…