Struct fidl_fuchsia_fxfs::CryptProxy
source · pub struct CryptProxy { /* private fields */ }
Implementations§
source§impl CryptProxy
impl CryptProxy
sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.fxfs/Crypt.
sourcepub fn take_event_stream(&self) -> CryptEventStream
pub fn take_event_stream(&self) -> CryptEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
sourcepub fn create_key(
&self,
owner: u64,
purpose: KeyPurpose,
) -> QueryResponseFut<CryptCreateKeyResult>
pub fn create_key( &self, owner: u64, purpose: KeyPurpose, ) -> QueryResponseFut<CryptCreateKeyResult>
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 UnwrapKeys
. The crypt service chooses a
wrapping_key_id
which must be supplied to UnwrapKeys. The wrapping_key_id
has no
meaning to Fxfs.
sourcepub fn unwrap_key(
&self,
wrapping_key_id: u64,
owner: u64,
key: &[u8],
) -> QueryResponseFut<CryptUnwrapKeyResult>
pub fn unwrap_key( &self, wrapping_key_id: u64, owner: u64, key: &[u8], ) -> QueryResponseFut<CryptUnwrapKeyResult>
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 Clone for CryptProxy
impl Clone for CryptProxy
source§fn clone(&self) -> CryptProxy
fn clone(&self) -> CryptProxy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl CryptProxyInterface for CryptProxy
impl CryptProxyInterface for CryptProxy
type CreateKeyResponseFut = QueryResponseFut<Result<(u64, Vec<u8>, Vec<u8>), i32>>
fn create_key( &self, owner: u64, purpose: KeyPurpose, ) -> Self::CreateKeyResponseFut
type UnwrapKeyResponseFut = QueryResponseFut<Result<Vec<u8>, i32>>
fn unwrap_key( &self, wrapping_key_id: u64, owner: u64, key: &[u8], ) -> Self::UnwrapKeyResponseFut
source§impl Debug for CryptProxy
impl Debug for CryptProxy
source§impl Proxy for CryptProxy
impl Proxy for CryptProxy
§type Protocol = CryptMarker
type Protocol = CryptMarker
The protocol which this
Proxy
controls.source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for CryptProxy
impl !RefUnwindSafe for CryptProxy
impl Send for CryptProxy
impl Sync for CryptProxy
impl Unpin for CryptProxy
impl !UnwindSafe for CryptProxy
Blanket Implementations§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)