Added routines for import key.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2023-02-13 23:52:58 +01:00
parent af16be64a2
commit 8f6ae52c70
2 changed files with 99 additions and 7 deletions

View File

@@ -123,3 +123,6 @@ class Padding(Enum):
RAW = 0x21
PKCS = 0x22
OAEP = 0x23
def int_to_bytes(x, length=None, byteorder='big'):
return x.to_bytes(length or (x.bit_length() + 7) // 8, byteorder=byteorder)