示例#1
0
def test_from_mpz():
    n_mpz = mpz('65535')
    buf = Buffer.from_mpz(n_mpz)

    assert_equal(buf.bytes, [255, 255])
示例#2
0
 def get_secret(self):
     """Return the private key as a Buffer instance"""
     return Buffer.from_mpz(self._secret_key)
示例#3
0
 def get_public(self):
     """Return the public key as a Buffer instance"""
     return Buffer.from_mpz(self._public_key)
示例#4
0
 def get_secret(self):
     """Return the private key as a Buffer instance"""
     return Buffer.from_mpz(self._secret_key)
示例#5
0
 def get_public(self):
     """Return the public key as a Buffer instance"""
     return Buffer.from_mpz(self._public_key)
示例#6
0
def test_from_mpz():
    n_mpz = mpz('65535')
    buf = Buffer.from_mpz(n_mpz)

    assert_equal(buf.bytes, [255, 255])