[Python] Incorrect documentation example for AES SIV open
synchronization opened this issue · comments
Roozbeh Daneshvar commented
In the following wiki document:
https://github.com/miscreant/miscreant/wiki/Python-Documentation
The last piece of example code should be like this:
import os
from miscreant.aes.siv import SIV
key = SIV.generate_key()
siv = SIV(key)
message = "Hello, world!"
nonce = os.urandom(16)
ciphertext = siv.seal(message, [nonce])
plaintext = siv.open(ciphertext, [nonce])
(only the last line is different as we should open ciphertext and not message)