Struct bc_components::PublicKeyBase
source · pub struct PublicKeyBase { /* private fields */ }Expand description
Holds information used to communicate cryptographically with a remote entity.
Includes the entity’s public signing key for verifying signatures, and the entity’s public agreement key used for X25519 key agreement.
Implementations§
source§impl PublicKeyBase
impl PublicKeyBase
sourcepub fn new(
signing_public_key: SigningPublicKey,
agreement_public_key: AgreementPublicKey
) -> Self
pub fn new( signing_public_key: SigningPublicKey, agreement_public_key: AgreementPublicKey ) -> Self
Restores a PublicKeyBase from a SigningPublicKey and an AgreementPublicKey.
sourcepub fn signing_public_key(&self) -> &SigningPublicKey
pub fn signing_public_key(&self) -> &SigningPublicKey
Returns the SigningPublicKey of this PublicKeyBase.
sourcepub fn agreement_public_key(&self) -> &AgreementPublicKey
pub fn agreement_public_key(&self) -> &AgreementPublicKey
Returns the AgreementPublicKey of this PublicKeyBase.
Trait Implementations§
source§impl AsRef<AgreementPublicKey> for PublicKeyBase
impl AsRef<AgreementPublicKey> for PublicKeyBase
source§fn as_ref(&self) -> &AgreementPublicKey
fn as_ref(&self) -> &AgreementPublicKey
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<PublicKeyBase> for PublicKeyBase
impl AsRef<PublicKeyBase> for PublicKeyBase
source§fn as_ref(&self) -> &PublicKeyBase
fn as_ref(&self) -> &PublicKeyBase
Converts this type into a shared reference of the (usually inferred) input type.
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 CBORDecodable for PublicKeyBase
impl CBORDecodable for PublicKeyBase
source§impl CBOREncodable for PublicKeyBase
impl CBOREncodable for PublicKeyBase
source§impl CBORTagged for PublicKeyBase
impl CBORTagged for PublicKeyBase
source§impl CBORTaggedDecodable for PublicKeyBase
impl CBORTaggedDecodable for PublicKeyBase
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 PublicKeyBase
impl CBORTaggedEncodable for PublicKeyBase
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 PublicKeyBase
impl Clone for PublicKeyBase
source§fn clone(&self) -> PublicKeyBase
fn clone(&self) -> PublicKeyBase
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 PublicKeyBase
impl Debug for PublicKeyBase
source§impl From<PublicKeyBase> for CBOR
impl From<PublicKeyBase> for CBOR
source§fn from(value: PublicKeyBase) -> Self
fn from(value: PublicKeyBase) -> Self
Converts to this type from the input type.
source§impl Hash for PublicKeyBase
impl Hash for PublicKeyBase
source§impl PartialEq for PublicKeyBase
impl PartialEq for PublicKeyBase
source§fn eq(&self, other: &PublicKeyBase) -> bool
fn eq(&self, other: &PublicKeyBase) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TryFrom<&CBOR> for PublicKeyBase
impl TryFrom<&CBOR> for PublicKeyBase
source§impl TryFrom<CBOR> for PublicKeyBase
impl TryFrom<CBOR> for PublicKeyBase
source§impl URDecodable for PublicKeyBase
impl URDecodable for PublicKeyBase
source§impl UREncodable for PublicKeyBase
impl UREncodable for PublicKeyBase
impl Eq for PublicKeyBase
impl StructuralPartialEq for PublicKeyBase
impl URCodable for PublicKeyBase
Auto Trait Implementations§
impl Freeze for PublicKeyBase
impl RefUnwindSafe for PublicKeyBase
impl Send for PublicKeyBase
impl Sync for PublicKeyBase
impl Unpin for PublicKeyBase
impl UnwindSafe for PublicKeyBase
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