MCPcopy Create free account
hub / github.com/doraemonext/wechat-python-sdk / decode

Method decode

wechat_sdk/lib/crypto/pkcs7.py:27–36  ·  view source on GitHub ↗

删除解密后明文的补位字符 @param decrypted: 解密后的明文 @return: 删除补位字符后的明文

(cls, decrypted)

Source from the content-addressed store, hash-verified

25
26 @classmethod
27 def decode(cls, decrypted):
28 """
29 删除解密后明文的补位字符
30 @param decrypted: 解密后的明文
31 @return: 删除补位字符后的明文
32 """
33 pad = ord(decrypted[-1])
34 if pad < 1 or pad > 32:
35 pad = 0
36 return decrypted[:-pad]

Callers 4

wechat_api_mockFunction · 0.45
api_weixin_mockFunction · 0.45
to_textFunction · 0.45
_transcodingMethod · 0.45

Calls

no outgoing calls

Tested by 1

wechat_api_mockFunction · 0.36