pub struct OrganizationPrivateKey<Ids: KeySlotIds> {
private_key_id: Ids::Private,
}Expand description
The organization’s private key, unwrapped into the key store context.
Fields§
§private_key_id: Ids::PrivateImplementations§
Source§impl<Ids: KeySlotIds> OrganizationPrivateKey<Ids>
impl<Ids: KeySlotIds> OrganizationPrivateKey<Ids>
Sourcepub fn unwrap_with_organization_key(
organization_key: Ids::Symmetric,
wrapped_organization_private_key: &EncString,
ctx: &mut KeyStoreContext<'_, Ids>,
) -> Result<Self, OrganizationPrivateKeyUnwrapError>
pub fn unwrap_with_organization_key( organization_key: Ids::Symmetric, wrapped_organization_private_key: &EncString, ctx: &mut KeyStoreContext<'_, Ids>, ) -> Result<Self, OrganizationPrivateKeyUnwrapError>
Unwraps the organization’s private key with the organization key.
wrapped_organization_private_key is the wrapped private key shared with the server.
Sourcepub fn from_context(
private_key_id: Ids::Private,
ctx: &KeyStoreContext<'_, Ids>,
) -> Option<Self>
pub fn from_context( private_key_id: Ids::Private, ctx: &KeyStoreContext<'_, Ids>, ) -> Option<Self>
The organization’s private key under private_key_id, or None when the key store context
does not hold it.
Sourcepub fn public_key(
&self,
ctx: &KeyStoreContext<'_, Ids>,
) -> Result<PublicKey, OrganizationPublicKeyError>
pub fn public_key( &self, ctx: &KeyStoreContext<'_, Ids>, ) -> Result<PublicKey, OrganizationPublicKeyError>
The organization’s public key.
Sourcepub fn trust_proof(&self) -> TrustProof<Ids>
pub fn trust_proof(&self) -> TrustProof<Ids>
The proof that the organization’s public key is trusted: the caller holds the private key.
Sourcepub(crate) fn decapsulate_key(
&self,
encapsulated_key: &UnsignedSharedKey,
ctx: &mut KeyStoreContext<'_, Ids>,
) -> Result<Ids::Symmetric, CryptoError>
pub(crate) fn decapsulate_key( &self, encapsulated_key: &UnsignedSharedKey, ctx: &mut KeyStoreContext<'_, Ids>, ) -> Result<Ids::Symmetric, CryptoError>
Opens a key that was encapsulated to the organization, returning the id it was added to the context under.
Auto Trait Implementations§
impl<Ids> Freeze for OrganizationPrivateKey<Ids>where
<Ids as KeySlotIds>::Private: Freeze,
impl<Ids> RefUnwindSafe for OrganizationPrivateKey<Ids>where
<Ids as KeySlotIds>::Private: RefUnwindSafe,
impl<Ids> Send for OrganizationPrivateKey<Ids>where
<Ids as KeySlotIds>::Private: Send,
impl<Ids> Sync for OrganizationPrivateKey<Ids>where
<Ids as KeySlotIds>::Private: Sync,
impl<Ids> Unpin for OrganizationPrivateKey<Ids>where
<Ids as KeySlotIds>::Private: Unpin,
impl<Ids> UnsafeUnpin for OrganizationPrivateKey<Ids>where
<Ids as KeySlotIds>::Private: UnsafeUnpin,
impl<Ids> UnwindSafe for OrganizationPrivateKey<Ids>where
<Ids as KeySlotIds>::Private: UnwindSafe,
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Consume a handle, getting back the initial
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
Converts
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> ⓘ
Converts
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