示例#1
0
 def sign(self, sigkey, object):
     s = serialize.Serializer()
     s.uint(object.expires, 8)
     s.uint(object.type, 4)
     s.vint(object.version)
     s.vint(object.stream)
     s.vint(self.addrver)
     s.vint(self.stream)
     s.uint(self.behavior, 4)
     s.bytes(self.verkey)
     s.bytes(self.enckey)
     s.vint(self.trials)
     s.vint(self.extra)
     s.bytes(self.ripe)
     s.vint(self.encoding)
     s.vbytes(self.message)
     s.vbytes(self.ack)
     self.signature = crypto.sign(sigkey, s.data)
示例#2
0
 def sign(self, sigkey, object):
     s = serialize.Serializer()
     s.uint(object.expires, 8)
     s.uint(object.type, 4)
     s.vint(object.version)
     s.vint(object.stream)
     s.vint(self.addrver)
     s.vint(self.stream)
     s.uint(self.behavior, 4)
     s.bytes(self.verkey)
     s.bytes(self.enckey)
     s.vint(self.trials)
     s.vint(self.extra)
     s.bytes(self.ripe)
     s.vint(self.encoding)
     s.vbytes(self.message)
     s.vbytes(self.ack)
     self.signature = crypto.sign(sigkey, s.data)
示例#3
0
 def sign(self, data):
     return crypto.sign(self.sigkey, data)
示例#4
0
 def sign(self, data):
     return crypto.sign(self.sigkey, data)