pub struct CryptSynchronousProxy { /* private fields */ }
Implementations§
Source§impl CryptSynchronousProxy
impl CryptSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<CryptEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<CryptEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn create_key(
&self,
owner: u64,
purpose: KeyPurpose,
___deadline: MonotonicInstant,
) -> Result<CryptCreateKeyResult, Error>
pub fn create_key( &self, owner: u64, purpose: KeyPurpose, ___deadline: MonotonicInstant, ) -> Result<CryptCreateKeyResult, Error>
Creates a new key wrapped with the key identified by wrapping_key_id
. owner
identifies
the owner of the key and must be supplied to UnwrapKey
. The crypt service chooses a
wrapping_key_id
which must be supplied to UnwrapKey. The wrapping_key_id
has no
meaning to Fxfs.
Sourcepub fn create_key_with_id(
&self,
owner: u64,
wrapping_key_id: &[u8; 16],
___deadline: MonotonicInstant,
) -> Result<CryptCreateKeyWithIdResult, Error>
pub fn create_key_with_id( &self, owner: u64, wrapping_key_id: &[u8; 16], ___deadline: MonotonicInstant, ) -> Result<CryptCreateKeyWithIdResult, Error>
Creates a new key wrapped with the key identified by wrapping_key_id
. owner
identifies
the owner of the key and must be supplied to UnwrapKey
along with wrapping_key_id
.
The wrapping_key_id
has no meaning to Fxfs.
Sourcepub fn unwrap_key(
&self,
wrapping_key_id: &[u8; 16],
owner: u64,
key: &[u8],
___deadline: MonotonicInstant,
) -> Result<CryptUnwrapKeyResult, Error>
pub fn unwrap_key( &self, wrapping_key_id: &[u8; 16], owner: u64, key: &[u8], ___deadline: MonotonicInstant, ) -> Result<CryptUnwrapKeyResult, Error>
Unwraps a key that is wrapped by the key identified by wrapping_key_id
. owner
must be
the same as that passed to CreateKey
. This can fail due to permission reasons, but an
incorrect key or owner will not fail; it will just return an unwrapped key that won’t
actually decrpyt the data.
Trait Implementations§
Source§impl Debug for CryptSynchronousProxy
impl Debug for CryptSynchronousProxy
Source§impl From<Channel> for CryptSynchronousProxy
impl From<Channel> for CryptSynchronousProxy
Source§impl From<CryptSynchronousProxy> for Handle
impl From<CryptSynchronousProxy> for Handle
Source§fn from(value: CryptSynchronousProxy) -> Self
fn from(value: CryptSynchronousProxy) -> Self
Source§impl SynchronousProxy for CryptSynchronousProxy
impl SynchronousProxy for CryptSynchronousProxy
Source§type Proxy = CryptProxy
type Proxy = CryptProxy
Source§type Protocol = CryptMarker
type Protocol = CryptMarker
Proxy
controls.