def decrypt(self, text, appid):
try:<EOL><INDENT>cryptor = AES.new(self.key, self.mode, self.key[:<NUM_LIT:16>])<EOL>plain_text = cryptor.decrypt(base64.b64decode(text))<EOL><DEDENT>except Exception as e:<EOL><INDENT>raise DecryptAESError(e)<EOL><DEDENT>try:<EOL><INDENT>if six.PY2:<EOL><INDENT>pad = ord(plain_text[-<NUM_LIT:1>])<EOL><DEDENT>else:<EOL><INDENT>pad = plain_text[-<NUM_LIT:1>]<EOL><DEDENT>content = plain_text[<NUM_LIT:16>:-pad]<EOL>xml_len = socket.ntohl(struct.unpack("<STR_LIT:I>", content[: <NUM_LIT:4>])[<NUM_LIT:0>])<EOL>xml_content = content[<NUM_LIT:4>: xml_len + <NUM_LIT:4>]<EOL>from_appid = content[xml_len + <NUM_LIT:4>:]<EOL><DEDENT>except Exception as e:<EOL><INDENT>raise IllegalBuffer(e)<EOL><DEDENT>if from_appid != appid:<EOL><INDENT>raise ValidateAppIDError()<EOL><DEDENT>return xml_content<EOL>
对解密后的明文进行补位删除

        @param text: 密文
        @return: 删除填充补位后的明文