def test_from_mpz(): n_mpz = mpz('65535') buf = Buffer.from_mpz(n_mpz) assert_equal(buf.bytes, [255, 255])
def get_secret(self): """Return the private key as a Buffer instance""" return Buffer.from_mpz(self._secret_key)
def get_public(self): """Return the public key as a Buffer instance""" return Buffer.from_mpz(self._public_key)