]> git.codecow.com Git - nano25519.git/commitdiff
Fix README examples.
authorChris Duncan <chris@zoso.dev>
Sun, 6 Sep 2026 09:33:02 +0000 (02:33 -0700)
committerChris Duncan <chris@zoso.dev>
Sun, 6 Sep 2026 09:33:02 +0000 (02:33 -0700)
README.md

index 87b86a210ac5ba0e1f479518736e07e82f32b203..a0a43afa3bbbc357b125323c4f819bff82a3f8ae 100644 (file)
--- a/README.md
+++ b/README.md
@@ -119,7 +119,7 @@ const pub = new Uint8Array(publicKeyBuffer);
 // `sig` is a signature for the message as a 128-character hexadecimal string
 const sig = nano25519.sign(msg, prv, pub);
 // clean up
-sk.fill(0);
+prv.fill(0);
 ```
 
 ### Sign (strings)
@@ -149,9 +149,9 @@ const pub = new Uint8Array(publicKeyBuffer);
 const sig = new Uint8Array(64);
 
 // return value is discarded, 64-byte signature is written to `sig`
-nano25519.sign(msg, prv, pub);
+nano25519.sign(msg, prv, pub, sig);
 // clean up
-sk.fill(0);
+prv.fill(0);
 ```
 
 ### Verify (bytes)