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, DefaultFuchsiaResourceDialect>
pub fn create_key( &self, owner: u64, purpose: KeyPurpose, ) -> QueryResponseFut<CryptCreateKeyResult, DefaultFuchsiaResourceDialect>
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],
) -> QueryResponseFut<CryptCreateKeyWithIdResult, DefaultFuchsiaResourceDialect>
pub fn create_key_with_id( &self, owner: u64, wrapping_key_id: &[u8; 16], ) -> QueryResponseFut<CryptCreateKeyWithIdResult, DefaultFuchsiaResourceDialect>
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],
) -> QueryResponseFut<CryptUnwrapKeyResult, DefaultFuchsiaResourceDialect>
pub fn unwrap_key( &self, wrapping_key_id: &[u8; 16], owner: u64, key: &[u8], ) -> QueryResponseFut<CryptUnwrapKeyResult, DefaultFuchsiaResourceDialect>
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl CryptProxyInterface for CryptProxy
impl CryptProxyInterface for CryptProxy
type CreateKeyResponseFut = QueryResponseFut<Result<([u8; 16], Vec<u8>, Vec<u8>), i32>>
type CreateKeyWithIdResponseFut = QueryResponseFut<Result<(Vec<u8>, Vec<u8>), i32>>
type UnwrapKeyResponseFut = QueryResponseFut<Result<Vec<u8>, i32>>
fn create_key( &self, owner: u64, purpose: KeyPurpose, ) -> Self::CreateKeyResponseFut
fn create_key_with_id( &self, owner: u64, wrapping_key_id: &[u8; 16], ) -> Self::CreateKeyWithIdResponseFut
fn unwrap_key( &self, wrapping_key_id: &[u8; 16], owner: u64, key: &[u8], ) -> Self::UnwrapKeyResponseFut
Source§impl Debug for CryptProxy
impl Debug for CryptProxy
Source§impl Proxy for CryptProxy
impl Proxy for CryptProxy
Source§type Protocol = CryptMarker
type Protocol = CryptMarker
Proxy
controls.