pub struct DeviceProxy { /* private fields */ }Implementations§
Source§impl DeviceProxy
impl DeviceProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.inlineencryption/Device.
Sourcepub fn take_event_stream(&self) -> DeviceEventStream
pub fn take_event_stream(&self) -> DeviceEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn program_key(
&self,
wrapped_key: &[u8],
data_unit_size: u32,
) -> QueryResponseFut<DeviceProgramKeyResult, DefaultFuchsiaResourceDialect>
pub fn program_key( &self, wrapped_key: &[u8], data_unit_size: u32, ) -> QueryResponseFut<DeviceProgramKeyResult, DefaultFuchsiaResourceDialect>
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],
) -> QueryResponseFut<DeviceDeriveRawSecretResult, DefaultFuchsiaResourceDialect>
pub fn derive_raw_secret( &self, wrapped_key: &[u8], ) -> QueryResponseFut<DeviceDeriveRawSecretResult, DefaultFuchsiaResourceDialect>
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 Clone for DeviceProxy
impl Clone for DeviceProxy
Source§fn clone(&self) -> DeviceProxy
fn clone(&self) -> DeviceProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeviceProxy
impl Debug for DeviceProxy
Source§impl DeviceProxyInterface for DeviceProxy
impl DeviceProxyInterface for DeviceProxy
type ProgramKeyResponseFut = QueryResponseFut<Result<u8, i32>>
type DeriveRawSecretResponseFut = QueryResponseFut<Result<Vec<u8>, i32>>
fn program_key( &self, wrapped_key: &[u8], data_unit_size: u32, ) -> Self::ProgramKeyResponseFut
fn derive_raw_secret( &self, wrapped_key: &[u8], ) -> Self::DeriveRawSecretResponseFut
Source§impl Proxy for DeviceProxy
impl Proxy for DeviceProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Proxy controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Source§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
PEER_CLOSED signal.