From 10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 14:41:41 +0200 Subject: Merging upstream version 1.70.0+dfsg2. Signed-off-by: Daniel Baumann --- vendor/signature/src/keypair.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 vendor/signature/src/keypair.rs (limited to 'vendor/signature/src/keypair.rs') diff --git a/vendor/signature/src/keypair.rs b/vendor/signature/src/keypair.rs new file mode 100644 index 000000000..6d9f947c6 --- /dev/null +++ b/vendor/signature/src/keypair.rs @@ -0,0 +1,17 @@ +//! Signing keypairs. + +use crate::Signature; + +/// Signing keypair with an associated verifying key. +/// +/// This represents a type which holds both a signing key and a verifying key. +pub trait Keypair: AsRef { + /// Verifying key type for this keypair. + type VerifyingKey; + + /// Get the verifying key which can verify signatures produced by the + /// signing key portion of this keypair. + fn verifying_key(&self) -> &Self::VerifyingKey { + self.as_ref() + } +} -- cgit v1.2.3