Home
last modified time | relevance | path

Searched refs:int2bytes (Results 1 – 5 of 5) sorted by relevance

/external/python/rsa/tests/
Dtest_transform.py16 from rsa.transform import int2bytes, bytes2int
21 self.assertEqual(int2bytes(123456789), b'\x07[\xcd\x15')
24 self.assertEqual(bytes2int(int2bytes(123456789, 128)), 123456789)
27 self.assertEqual(int2bytes(123456789, 6), b'\x00\x00\x07[\xcd\x15')
28 self.assertEqual(int2bytes(123456789, 7),
32 self.assertEqual(int2bytes(0, 4), b'\x00' * 4)
33 self.assertEqual(int2bytes(0, 7), b'\x00' * 7)
34 self.assertEqual(int2bytes(0), b'\x00')
44 self.assertEqual(bytes2int(int2bytes(value)),
49 self.assertRaises(OverflowError, int2bytes, 123456789, 3)
[all …]
Dtest_pkcs1.py216 cyphertext = rsa.transform.int2bytes(encrypted_value, keylength)
/external/python/rsa/rsa/
Dpkcs1.py191 block = transform.int2bytes(encrypted, keylength)
250 cleartext = transform.int2bytes(decrypted, blocksize)
307 block = transform.int2bytes(encrypted, keylength)
352 clearsig = transform.int2bytes(decrypted, keylength)
386 clearsig = transform.int2bytes(decrypted, keylength)
Dtransform.py37 def int2bytes(number: int, fill_size: int = 0) -> bytes: function
Dpkcs1_v2.py74 seed + transform.int2bytes(counter, fill_size=4),