Skip to content

Commit 3be032c

Browse files
author
Lukas Puehringer
committed
Fix signing code snippets in documentation
Adopt create and verify signature snippets in documentation to accept data to be signed as bytes instead of strings, as changed in #162.
1 parent 935a002 commit 3be032c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ cryptographic operations.
173173

174174
>>> from securesystemslib.keys import *
175175

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

190190
# Continuing from the previous sections . . .
191191

192-
>>> data = 'The quick brown fox jumps over the lazy dog'
192+
>>> data = b'The quick brown fox jumps over the lazy dog'
193193
>>> ed25519_key = generate_ed25519_key()
194194
>>> signature = create_signature(ed25519_key, data)
195195
>>> verify_signature(ed25519_key, signature, data)

0 commit comments

Comments
 (0)