pub enum SigningPublicKey {
Schnorr(SchnorrPublicKey),
ECDSA(ECPublicKey),
Ed25519(Ed25519PublicKey),
SSH(PublicKey),
}Expand description
A public key that can be used for signing. Supports both ECDSA and Schnorr.
Variants§
Implementations§
Source§impl SigningPublicKey
impl SigningPublicKey
Sourcepub fn from_schnorr(key: SchnorrPublicKey) -> Self
pub fn from_schnorr(key: SchnorrPublicKey) -> Self
Restores a SigningPublicKey from a SchnorrPublicKey.
Sourcepub fn from_ecdsa(key: ECPublicKey) -> Self
pub fn from_ecdsa(key: ECPublicKey) -> Self
Restores a SigningPublicKey from an ECPublicKey.
Sourcepub fn from_ed25519(key: Ed25519PublicKey) -> Self
pub fn from_ed25519(key: Ed25519PublicKey) -> Self
Restores a SigningPublicKey from an Ed25519PublicKey.
Sourcepub fn from_ssh(key: SSHPublicKey) -> Self
pub fn from_ssh(key: SSHPublicKey) -> Self
Restores a SigningPublicKey from an SSH public key.
Sourcepub fn to_schnorr(&self) -> Option<&SchnorrPublicKey>
pub fn to_schnorr(&self) -> Option<&SchnorrPublicKey>
Returns the SchnorrPublicKey of this SigningPublicKey, if it is a Schnorr key.
Sourcepub fn to_ecdsa(&self) -> Option<&ECPublicKey>
pub fn to_ecdsa(&self) -> Option<&ECPublicKey>
Returns the ECPublicKey of this SigningPublicKey, if it is an ECDSA key.
Sourcepub fn to_ssh(&self) -> Option<&SSHPublicKey>
pub fn to_ssh(&self) -> Option<&SSHPublicKey>
Returns the SSH public key of this SigningPublicKey, if it is an SSH key.
Trait Implementations§
Source§impl AsRef<SigningPublicKey> for PublicKeyBase
impl AsRef<SigningPublicKey> for PublicKeyBase
Source§fn as_ref(&self) -> &SigningPublicKey
fn as_ref(&self) -> &SigningPublicKey
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<SigningPublicKey> for SigningPublicKey
impl AsRef<SigningPublicKey> for SigningPublicKey
Source§fn as_ref(&self) -> &SigningPublicKey
fn as_ref(&self) -> &SigningPublicKey
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl CBORTagged for SigningPublicKey
impl CBORTagged for SigningPublicKey
The CBOR tags assocated with this type. If more than one tag is present,
they are considered equivalent for reading, but only the first one is
used for writing.
Source§impl CBORTaggedDecodable for SigningPublicKey
impl CBORTaggedDecodable for SigningPublicKey
Source§fn from_untagged_cbor(untagged_cbor: CBOR) -> Result<Self>
fn from_untagged_cbor(untagged_cbor: CBOR) -> Result<Self>
Creates an instance of this type by decoding it from untagged CBOR.
Source§fn from_tagged_cbor(cbor: CBOR) -> Result<Self, Error>where
Self: Sized,
fn from_tagged_cbor(cbor: CBOR) -> Result<Self, Error>where
Self: Sized,
Creates an instance of this type by decoding it from tagged CBOR.
Source§impl CBORTaggedEncodable for SigningPublicKey
impl CBORTaggedEncodable for SigningPublicKey
Source§fn untagged_cbor(&self) -> CBOR
fn untagged_cbor(&self) -> CBOR
Returns the untagged CBOR encoding of this instance.
Source§fn tagged_cbor(&self) -> CBOR
fn tagged_cbor(&self) -> CBOR
Returns the tagged CBOR encoding of this instance.
Source§impl Clone for SigningPublicKey
impl Clone for SigningPublicKey
Source§fn clone(&self) -> SigningPublicKey
fn clone(&self) -> SigningPublicKey
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SigningPublicKey
impl Debug for SigningPublicKey
Source§impl From<&SigningPublicKey> for XID
impl From<&SigningPublicKey> for XID
Source§fn from(key: &SigningPublicKey) -> Self
fn from(key: &SigningPublicKey) -> Self
Converts to this type from the input type.
Source§impl From<SigningPublicKey> for CBOR
impl From<SigningPublicKey> for CBOR
Source§fn from(value: SigningPublicKey) -> Self
fn from(value: SigningPublicKey) -> Self
Converts to this type from the input type.
Source§impl Hash for SigningPublicKey
impl Hash for SigningPublicKey
Source§impl PartialEq for SigningPublicKey
impl PartialEq for SigningPublicKey
Source§impl TryFrom<CBOR> for SigningPublicKey
impl TryFrom<CBOR> for SigningPublicKey
Source§impl Verifier for SigningPublicKey
impl Verifier for SigningPublicKey
impl Eq for SigningPublicKey
impl StructuralPartialEq for SigningPublicKey
Auto Trait Implementations§
impl Freeze for SigningPublicKey
impl RefUnwindSafe for SigningPublicKey
impl Send for SigningPublicKey
impl Sync for SigningPublicKey
impl Unpin for SigningPublicKey
impl UnwindSafe for SigningPublicKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more