use "latin-1" consitently (not "iso-8859-1")

This commit is contained in:
jesopo 2020-02-24 13:28:23 +00:00
parent 6535ec731c
commit fc32a907a5

View file

@ -49,7 +49,7 @@ def rsa_encrypt(key_filename: str, data: bytes) -> str:
out = key.encrypt(data, a_padding.OAEP(
mgf=a_padding.MGF1(algorithm=hashes.SHA256()),
algorithm=hashes.SHA256(), label=None))
return base64.b64encode(out).decode("iso-8859-1")
return base64.b64encode(out).decode("latin-1")
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.primitives import padding