mirror of
https://github.com/Legrandin/pycryptodome.git
synced 2025-10-19 07:53:49 +00:00
Fix CBC mode encryption example in classic.rst
Fix the result of the CBC mode encryption example by base64 encoding iv and ciphertext only once.
This commit is contained in:
parent
dc92e70ffb
commit
20a98cb231
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ Example (encryption)::
|
|||
>>> ct = b64encode(ct_bytes).decode('utf-8')
|
||||
>>> result = json.dumps({'iv':iv, 'ciphertext':ct})
|
||||
>>> print(result)
|
||||
'{"iv": "bWRHdzkzVDFJbWNBY0EwSmQ1UXFuQT09", "ciphertext": "VDdxQVo3TFFCbXIzcGpYa1lJbFFZQT09"}'
|
||||
'{"iv": "mdGw93T1ImcAcA0Jd5QqnA==", "ciphertext": "T7qAZ7LQBmr3pjXkYIlQYA=="}'
|
||||
|
||||
Example (decryption)::
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue