pub struct DeviceSynchronousProxy { /* private fields */ }Implementations§
Source§impl DeviceSynchronousProxy
impl DeviceSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<DeviceEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<DeviceEvent, 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 program_key(
&self,
wrapped_key: &[u8],
data_unit_size: u32,
___deadline: MonotonicInstant,
) -> Result<DeviceProgramKeyResult, Error>
pub fn program_key( &self, wrapped_key: &[u8], data_unit_size: u32, ___deadline: MonotonicInstant, ) -> Result<DeviceProgramKeyResult, Error>
Programs the ephemerally wrapped wrapped_key into the inline encryption hardware in the
next available slot. All slots programmed via the connection this method is called on
will be evicted once the connection is dropped. It is not possible to evict individual keys
(not for any technical reasons; a need for this has not yet arisen). wrapped_key must be
a key wrapped by the inline encryption hardware (in the same session/boot) via a separate
mechanism to this protocol.
Returns
- ZX_ERR_NO_RESOURCES if there are no available key slots.
- ZX_ERR_INVALID_ARGS if
wrapped_keyis not the expected size or if thewrapped_keyfails authentication (e.g. wrapped_key is from a previous boot). - ZX_ERR_TIMED_OUT if the operation times out.
- ZX_ERR_INTERNAL if the operation failed for any other reason.
Sourcepub fn derive_raw_secret(
&self,
wrapped_key: &[u8],
___deadline: MonotonicInstant,
) -> Result<DeviceDeriveRawSecretResult, Error>
pub fn derive_raw_secret( &self, wrapped_key: &[u8], ___deadline: MonotonicInstant, ) -> Result<DeviceDeriveRawSecretResult, Error>
Derives a raw software secret from the ephemerally wrapped wrapped_key. wrapped_key
must be a key wrapped by the inline encryption hardware (in the same session/boot) via a
separate mechanism to this protocol. The returned secret can be used for non-inline
cryptographic operations e.g. it can be used for encrypting filesystem metadata not covered
by inline encryption.
Returns
- ZX_ERR_INVALID_ARGS if
wrapped_keyis not the expected size or if thewrapped_keyfails authentication (e.g. wrapped_key is from a previous boot). - ZX_ERR_TIMED_OUT if the operation times out.
- ZX_ERR_INTERNAL if the operation failed for any other reason.
Trait Implementations§
Source§impl Debug for DeviceSynchronousProxy
impl Debug for DeviceSynchronousProxy
Source§impl From<Channel> for DeviceSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for DeviceSynchronousProxy
Source§impl From<DeviceSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<DeviceSynchronousProxy> for NullableHandle
Source§fn from(value: DeviceSynchronousProxy) -> Self
fn from(value: DeviceSynchronousProxy) -> Self
Source§impl FromClient for DeviceSynchronousProxy
Available on Fuchsia only.
impl FromClient for DeviceSynchronousProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Source§fn from_client(value: ClientEnd<DeviceMarker>) -> Self
fn from_client(value: ClientEnd<DeviceMarker>) -> Self
Source§impl SynchronousProxy for DeviceSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for DeviceSynchronousProxy
Source§type Proxy = DeviceProxy
type Proxy = DeviceProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Proxy controls.