a1d0d8dd82ee9ce2a57ecdc47b217780ac01b6a9,phe/paillier.py,PaillierPublicKey,__repr__,#PaillierPublicKey#,89
Before Change
def __repr__(self):
nsquare = self.nsquare.to_bytes(1024, "big")
g = self.g.to_bytes(1024, "big")
publicKeyHash = hashlib.sha1(nsquare + g).hexdigest()
return "<PaillierPublicKey {}>".format(publicKeyHash[:10])
def __eq__(self, other):
return self.n == other.n
After Change
self.max_int = n // 3 - 1
def __repr__(self):
publicKeyHash = hex(hash(self))[2:]
return "<PaillierPublicKey {}>".format(publicKeyHash[:10])
def __eq__(self, other):
return self.n == other.n
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: data61/python-paillier
Commit Name: a1d0d8dd82ee9ce2a57ecdc47b217780ac01b6a9
Time: 2017-07-04
Author: brian@thorne.link
File Name: phe/paillier.py
Class Name: PaillierPublicKey
Method Name: __repr__
Project Name: explosion/thinc
Commit Name: 62e7310b3429732d505621e5442920a4da3268d9
Time: 2020-01-13
Author: ines@ines.io
File Name: thinc/model.py
Class Name: Model
Method Name: to_bytes
Project Name: explosion/thinc
Commit Name: cc53003029d11839c394a9544a1394b62721869d
Time: 2019-10-18
Author: honnibal+gh@gmail.com
File Name: thinc/extra/wrappers.py
Class Name: PyTorchWrapper
Method Name: use_params