Struct matrix_sdk_crypto::olm::PrivateCrossSigningIdentity
source · [−]pub struct PrivateCrossSigningIdentity { /* private fields */ }
Expand description
Private cross signing identity.
This object holds the private and public ed25519 key triplet that is used for cross signing.
The object might be completely empty or have only some of the key pairs available.
It can be used to sign devices or other identities.
Implementations
sourceimpl PrivateCrossSigningIdentity
impl PrivateCrossSigningIdentity
sourcepub async fn is_empty(&self) -> bool
pub async fn is_empty(&self) -> bool
Is the identity empty.
An empty identity doesn’t contain any private keys.
It is usual for the identity not to contain the master key since the master key is only needed to sign the subkeys.
An empty identity indicates that either no identity was created for this use or that another device created it and hasn’t shared it yet with us.
sourcepub async fn can_sign_devices(&self) -> bool
pub async fn can_sign_devices(&self) -> bool
Can we sign our own devices, i.e. do we have a self signing key.
sourcepub async fn can_sign_users(&self) -> bool
pub async fn can_sign_users(&self) -> bool
Can we sign other users, i.e. do we have a user signing key.
sourcepub async fn has_master_key(&self) -> bool
pub async fn has_master_key(&self) -> bool
Do we have the master key.
sourcepub async fn status(&self) -> CrossSigningStatus
pub async fn status(&self) -> CrossSigningStatus
Get the status of our private cross signing keys, i.e. if we have the master key and the subkeys.
sourcepub async fn master_public_key(&self) -> Option<MasterPubkey>
pub async fn master_public_key(&self) -> Option<MasterPubkey>
Get the public part of the master key, if we have one.
sourcepub async fn self_signing_public_key(&self) -> Option<SelfSigningPubkey>
pub async fn self_signing_public_key(&self) -> Option<SelfSigningPubkey>
Get the public part of the self-signing key, if we have one.
sourcepub async fn user_signing_public_key(&self) -> Option<UserSigningPubkey>
pub async fn user_signing_public_key(&self) -> Option<UserSigningPubkey>
Get the public part of the user-signing key, if we have one.
sourcepub async fn export_secret(&self, secret_name: &SecretName) -> Option<String>
pub async fn export_secret(&self, secret_name: &SecretName) -> Option<String>
Export the seed of the private cross signing key
The exported seed will be encoded as unpadded base64.
Arguments
secret_name
- The type of the cross signing key that should be exported.
sourcepub async fn import_secrets_unchecked(
&self,
master_key: Option<&str>,
self_signing_key: Option<&str>,
user_signing_key: Option<&str>
) -> Result<(), SecretImportError>
pub async fn import_secrets_unchecked(
&self,
master_key: Option<&str>,
self_signing_key: Option<&str>,
user_signing_key: Option<&str>
) -> Result<(), SecretImportError>
Import the private parts of the cross signing keys into this identity.
The private parts should be unexpanded Ed25519 keys encoded as a base64 string.
Note: This method won’t check if the public keys match the public keys present on the server.
Mark the identity as shared.
Has the identity been shared.
A shared identity here means that the public keys of the identity have been uploaded to the server.
sourcepub async fn pickle(&self) -> Result<PickledCrossSigningIdentity, JsonError>
pub async fn pickle(&self) -> Result<PickledCrossSigningIdentity, JsonError>
sourcepub async fn from_pickle(
pickle: PickledCrossSigningIdentity
) -> Result<Self, SigningError>
pub async fn from_pickle(
pickle: PickledCrossSigningIdentity
) -> Result<Self, SigningError>
Restore the private cross signing identity from a pickle.
Panic
Panics if the pickle_key isn’t 32 bytes long.
Trait Implementations
sourceimpl Clone for PrivateCrossSigningIdentity
impl Clone for PrivateCrossSigningIdentity
sourcefn clone(&self) -> PrivateCrossSigningIdentity
fn clone(&self) -> PrivateCrossSigningIdentity
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for PrivateCrossSigningIdentity
impl Send for PrivateCrossSigningIdentity
impl Sync for PrivateCrossSigningIdentity
impl Unpin for PrivateCrossSigningIdentity
impl !UnwindSafe for PrivateCrossSigningIdentity
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more