Searched refs:int2bytes (Results 1 – 5 of 5) sorted by relevance
/external/python/rsa/tests/ |
D | test_transform.py | 16 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 …]
|
D | test_pkcs1.py | 216 cyphertext = rsa.transform.int2bytes(encrypted_value, keylength)
|
/external/python/rsa/rsa/ |
D | pkcs1.py | 191 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)
|
D | transform.py | 37 def int2bytes(number: int, fill_size: int = 0) -> bytes: function
|
D | pkcs1_v2.py | 74 seed + transform.int2bytes(counter, fill_size=4),
|