Struct matrix_sdk_crypto::types::SelfSigningPubkey
source · pub struct SelfSigningPubkey(/* private fields */);
Expand description
Wrapper for a cross signing key marking it as a self signing key.
Self signing keys are used to sign the user’s own devices.
Implementations§
source§impl SelfSigningPubkey
impl SelfSigningPubkey
sourcepub fn keys(&self) -> &SigningKeys<OwnedDeviceKeyId>
pub fn keys(&self) -> &SigningKeys<OwnedDeviceKeyId>
Get the keys map of containing the self signing keys.
sourcepub fn get_first_key(&self) -> Option<Ed25519PublicKey>
pub fn get_first_key(&self) -> Option<Ed25519PublicKey>
Get the first available self signing key.
There’s usually only a single key so this will usually fetch the only key.
sourcepub fn verify_device_keys(
&self,
device_keys: &DeviceKeys,
) -> Result<(), SignatureError>
pub fn verify_device_keys( &self, device_keys: &DeviceKeys, ) -> Result<(), SignatureError>
Verify that the DeviceKeys
have a valid signature from this
self-signing key.
Trait Implementations§
source§impl AsMut<CrossSigningKey> for SelfSigningPubkey
impl AsMut<CrossSigningKey> for SelfSigningPubkey
source§fn as_mut(&mut self) -> &mut CrossSigningKey
fn as_mut(&mut self) -> &mut CrossSigningKey
source§impl AsRef<CrossSigningKey> for SelfSigningPubkey
impl AsRef<CrossSigningKey> for SelfSigningPubkey
source§fn as_ref(&self) -> &CrossSigningKey
fn as_ref(&self) -> &CrossSigningKey
source§impl Clone for SelfSigningPubkey
impl Clone for SelfSigningPubkey
source§fn clone(&self) -> SelfSigningPubkey
fn clone(&self) -> SelfSigningPubkey
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SelfSigningPubkey
impl Debug for SelfSigningPubkey
source§impl<'de> Deserialize<'de> for SelfSigningPubkey
impl<'de> Deserialize<'de> for SelfSigningPubkey
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl<'a> IntoIterator for &'a SelfSigningPubkey
impl<'a> IntoIterator for &'a SelfSigningPubkey
§type Item = (&'a OwnedKeyId<DeviceKeyAlgorithm, DeviceId>, &'a SigningKey)
type Item = (&'a OwnedKeyId<DeviceKeyAlgorithm, DeviceId>, &'a SigningKey)
§type IntoIter = Iter<'a, OwnedKeyId<DeviceKeyAlgorithm, DeviceId>, SigningKey>
type IntoIter = Iter<'a, OwnedKeyId<DeviceKeyAlgorithm, DeviceId>, SigningKey>
source§impl PartialEq for SelfSigningPubkey
impl PartialEq for SelfSigningPubkey
source§fn eq(&self, other: &Self) -> bool
fn eq(&self, other: &Self) -> bool
The PartialEq
implementation compares the user ID, the usage and the
key material, ignoring signatures.
The usage could be safely ignored since the type guarantees it has the correct usage by construction – it is impossible to construct a value of a particular key type with an incorrect usage. However, we check it anyway, to codify the notion that the same key material with a different usage results in a logically different key.
The signatures are provided by other devices and don’t alter the identity of the key itself.
source§impl Serialize for SelfSigningPubkey
impl Serialize for SelfSigningPubkey
source§impl TryFrom<CrossSigningKey> for SelfSigningPubkey
impl TryFrom<CrossSigningKey> for SelfSigningPubkey
impl Eq for SelfSigningPubkey
Auto Trait Implementations§
impl Freeze for SelfSigningPubkey
impl RefUnwindSafe for SelfSigningPubkey
impl Send for SelfSigningPubkey
impl Sync for SelfSigningPubkey
impl Unpin for SelfSigningPubkey
impl UnwindSafe for SelfSigningPubkey
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> CompatExt for T
impl<T> CompatExt for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more