Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions cryptography/lib/src/cryptography/algorithms.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1068,20 +1068,19 @@ abstract class Ecdh extends KeyExchangeAlgorithm {
/// // In this example, we use ECDSA-P256-SHA256
/// final algorithm = Ecdsa.p256(Sha256());
///
/// // Generate a random key pair
/// final secretKey = await algorithm.newSecretKey();
/// final publicKey = await algorithm.publicKey(secretKey);
/// // Generate a key pair
/// final keyPair = await algorithm.newKeyPair();
///
/// // Sign a message
/// final message = <int>[1,2,3];
/// final signature = await algorithm.sign(
/// [1,2,3],
/// secretKey: secretKey,
/// message,
/// keyPair: keyPair,
/// );
///
/// // Anyone can verify the signature
/// final isVerified = await algorithm.verify(
/// message: message,
/// final isSignatureCorrect = await algorithm.verify(
/// message,
/// signature: signature,
/// );
/// }
Expand Down