From 3670c03d711e2af1105651581bc1bb0435f66d00 Mon Sep 17 00:00:00 2001 From: Lukas Puehringer Date: Tue, 13 Aug 2019 13:47:08 +0200 Subject: [PATCH] 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 https://github.com/secure-systems-lab/securesystemslib/pull/162. --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 6d49824df..0d1d74ce1 100644 --- a/README.rst +++ b/README.rst @@ -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) @@ -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)