pub struct CryptProxy { /* private fields */ }Implementations§
Source§impl CryptProxy
 
impl CryptProxy
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.
TODO(https://fxbug.dev/445189846): Add an object_type field to support inline encryption.
Sourcepub fn create_key_with_id(
    &self,
    owner: u64,
    wrapping_key_id: &[u8; 16],
    object_type: ObjectType,
) -> QueryResponseFut<CryptCreateKeyWithIdResult, DefaultFuchsiaResourceDialect>
 
pub fn create_key_with_id( &self, owner: u64, wrapping_key_id: &[u8; 16], object_type: ObjectType, ) -> 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,
    owner: u64,
    wrapped_key: &WrappedKey,
) -> QueryResponseFut<CryptUnwrapKeyResult, DefaultFuchsiaResourceDialect>
 
pub fn unwrap_key( &self, owner: u64, wrapped_key: &WrappedKey, ) -> QueryResponseFut<CryptUnwrapKeyResult, DefaultFuchsiaResourceDialect>
Unwraps a key.  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.
ZX_ERR_UNAVAILABLE is returned if the key is known but cannot be unwrapped (e.g. it is
locked).
ZX_ERR_NOT_FOUND is returned if the key is not known. In some cases, implementations are
unable to tell the difference between the two, in which case, ZX_ERR_UNAVAILABLE is
returned.
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<(WrappedKey, 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], object_type: ObjectType, ) -> Self::CreateKeyWithIdResponseFut
fn unwrap_key( &self, owner: u64, wrapped_key: &WrappedKey, ) -> 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.