def verify(self, data, signature, offset=0, length=0): assert isinstance(data, str) assert isinstance(signature, str) assert isinstance(offset, (int, long)) assert isinstance(length, (int, long)) length = length or len(data) return self._signature_length == len(signature) and ec_verify(self._ec, sha1(data[offset:offset+length]).digest(), signature)
def verify(self, data, signature, offset=0, length=0): """ Verify that DATA, starting at OFFSET up to LENGTH bytes, was signed by this member and matches SIGNATURE. DATA is the signed data and the signature concatenated. OFFSET is the offset for the signed data. LENGTH is the length of the signature and the data, in bytes. Returns True or False. """ assert isinstance(data, str) assert isinstance(signature, str) assert isinstance(offset, (int, long)) assert isinstance(length, (int, long)) return self._public_key and \ self._signature_length == len(signature) \ and ec_verify(self._ec, sha1(data[offset:offset+(length or len(data))]).digest(), signature)
def verify(self, data, signature, offset=0, length=0): """ Verify that DATA, starting at OFFSET up to LENGTH bytes, was signed by this member and matches SIGNATURE. DATA is the signed data and the signature concatenated. OFFSET is the offset for the signed data. LENGTH is the length of the signature and the data, in bytes. Returns True or False. """ assert isinstance(data, str) assert isinstance(signature, str) assert isinstance(offset, (int, long)) assert isinstance(length, (int, long)) length = length or len(data) return self._public_key and \ self._signature_length == len(signature) \ and ec_verify(self._ec, sha1(data[offset:offset+length]).digest(), signature)
def verify(self, data, signature, offset = 0, length = 0): length = length or len(data) return self._signature_length == len(signature) and ec_verify(self._ec, sha1(data[offset:offset + length]).digest(), signature)