From 4e3e6aad950bac11b1c7eef46b5a3271b6c5b158 Mon Sep 17 00:00:00 2001 From: terrier989 Date: Fri, 21 Nov 2025 04:48:09 +0000 Subject: [PATCH] fix: Documentation issues (#92, #132, #173) --- cryptography/README.md | 2 +- cryptography/lib/src/cryptography/algorithms.dart | 2 +- cryptography/lib/src/cryptography/cipher.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cryptography/README.md b/cryptography/README.md index 00b1a87d..f3cbd84c 100644 --- a/cryptography/README.md +++ b/cryptography/README.md @@ -349,7 +349,7 @@ Future main() async { keyPair: aliceKeyPair, remotePublicKey: bobPublicKey, ); - final sharedSecretBytes = await aliceKeyPair.extractBytes(); + final sharedSecretBytes = await sharedSecret.extractBytes(); print('Shared secret: $sharedSecretBytes'); } ``` diff --git a/cryptography/lib/src/cryptography/algorithms.dart b/cryptography/lib/src/cryptography/algorithms.dart index c862a662..d094321e 100644 --- a/cryptography/lib/src/cryptography/algorithms.dart +++ b/cryptography/lib/src/cryptography/algorithms.dart @@ -1605,7 +1605,7 @@ abstract class Poly1305 extends MacAlgorithm { /// import 'package:cryptography/cryptography.dart'; /// /// Future main() async { -/// final algorithm = RsaPss(Sha256()); +/// final algorithm = RsaPss.sha256(); /// /// // Generate a key pair /// final keyPair = await algorithm.newKeyPair(); diff --git a/cryptography/lib/src/cryptography/cipher.dart b/cryptography/lib/src/cryptography/cipher.dart index 1f6e8337..b49ace8c 100644 --- a/cryptography/lib/src/cryptography/cipher.dart +++ b/cryptography/lib/src/cryptography/cipher.dart @@ -348,7 +348,7 @@ abstract class Cipher { /// secretKey: secretKey, /// nonce: nonce, /// ); - /// await encryptedSink.addStream(encryptedStream); + /// await sink.addStream(encryptedStream); /// } finally { /// sink.close(); /// }