Skip to content
This repository has been archived by the owner on Feb 5, 2021. It is now read-only.

[Python] Incorrect documentation example for AES SIV open #192

Open
synchronization opened this issue Oct 12, 2018 · 0 comments
Open

[Python] Incorrect documentation example for AES SIV open #192

synchronization opened this issue Oct 12, 2018 · 0 comments

Comments

@synchronization
Copy link

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)

@synchronization synchronization changed the title Incorrect Python documentation example for AES SIV open [Python] Incorrect documentation example for AES SIV open Oct 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant