Skip to content

Commit

Permalink
Fix signing code snippets in documentation
Browse files Browse the repository at this point in the history
Adopt create and verify signature snippets in documentation to
accept data to be signed as bytes instead of strings, as changed
in secure-systems-lab#162.
  • Loading branch information
lukpueh committed Aug 14, 2019
1 parent 66188b7 commit 5db2617
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ cryptographic operations.

>>> from securesystemslib.keys import *

>>> data = 'The quick brown fox jumps over the lazy dog'
>>> data = b'The quick brown fox jumps over the lazy dog'
>>> ed25519_key = generate_ed25519_key()
>>> signature = create_signature(ed25519_key, data)
>>> rsa_key = generate_rsa_key(2048)
Expand All @@ -189,7 +189,7 @@ Verify ECDSA, Ed25519, and RSA Signatures

# Continuing from the previous sections . . .

>>> data = 'The quick brown fox jumps over the lazy dog'
>>> data = b'The quick brown fox jumps over the lazy dog'
>>> ed25519_key = generate_ed25519_key()
>>> signature = create_signature(ed25519_key, data)
>>> verify_signature(ed25519_key, signature, data)
Expand Down

0 comments on commit 5db2617

Please sign in to comment.