def public_decrypt(self, data, padding): # type: (bytes, int) -> bytes assert self.check_key(), 'key is not initialised' return m2.rsa_public_decrypt(self.rsa, data, padding)
def public_decrypt(self, data, padding): assert self.check_key(), 'key is not initialised' return m2.rsa_public_decrypt(self.rsa, data, padding)
def _public_crypt(self, c): s = num_to_bytes(c, self.n_bytes) m = bytes_to_num(m2.rsa_public_decrypt(self.rsa, s, m2.no_padding)) return m