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, FDomainResourceDialect>
pub fn create_key( &self, owner: u64, purpose: KeyPurpose, ) -> QueryResponseFut<CryptCreateKeyResult, FDomainResourceDialect>
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, FDomainResourceDialect>
pub fn create_key_with_id( &self, owner: u64, wrapping_key_id: &[u8; 16], object_type: ObjectType, ) -> QueryResponseFut<CryptCreateKeyWithIdResult, FDomainResourceDialect>
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, FDomainResourceDialect>
pub fn unwrap_key( &self, owner: u64, wrapped_key: &WrappedKey, ) -> QueryResponseFut<CryptUnwrapKeyResult, FDomainResourceDialect>
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>, FDomainResourceDialect>
type CreateKeyWithIdResponseFut = QueryResponseFut<Result<(WrappedKey, Vec<u8>), i32>, FDomainResourceDialect>
type UnwrapKeyResponseFut = QueryResponseFut<Result<Vec<u8>, i32>, FDomainResourceDialect>
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.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Source§fn into_channel(self) -> Result<Channel, Self>
fn into_channel(self) -> Result<Channel, Self>
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Source§fn domain(&self) -> Arc<Client>
fn domain(&self) -> Arc<Client>
Source§fn on_closed(&self) -> OnFDomainSignals
fn on_closed(&self) -> OnFDomainSignals
PEER_CLOSED signal.Auto Trait Implementations§
impl Freeze for CryptProxy
impl !RefUnwindSafe for CryptProxy
impl Send for CryptProxy
impl Sync for CryptProxy
impl Unpin for CryptProxy
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]