def _check_signature(self, msg_signature, timestamp, nonce, echostr):
signature = get_sha1_signature(self.__token, timestamp, nonce, echostr)<EOL>if not signature == msg_signature:<EOL><INDENT>raise ValidateSignatureError()<EOL><DEDENT>try:<EOL><INDENT>return self.__pc.decrypt(echostr, self.__id)<EOL><DEDENT>except DecryptAESError as e:<EOL><INDENT>raise ValidateSignatureError(e)<EOL><DEDENT>
验证签名有效性

        :param msg_signature: 签名串，对应URL参数的msg_signature
        :param timestamp: 时间戳，对应URL参数的timestamp
        :param nonce: 随机串，对应URL参数的nonce
        :param echostr: 随机串，对应URL参数的echostr
        :return: 解密之后的echostr
        :raise ValidateSignatureError: 签名无效异常