Beispiel #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)
Beispiel #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)
Beispiel #3
0
 def sign(self, data):
     return crypto.sign(self.sigkey, data)
Beispiel #4
0
 def sign(self, data):
     return crypto.sign(self.sigkey, data)