pub struct CryptService { /* private fields */ }Implementations§
Source§impl CryptService
impl CryptService
Sourcepub fn new(
raw_metadata_key: &[u8],
raw_data_key: &[u8],
inline_crypto_proxy: Option<DeviceSynchronousProxy>,
) -> Self
pub fn new( raw_metadata_key: &[u8], raw_data_key: &[u8], inline_crypto_proxy: Option<DeviceSynchronousProxy>, ) -> Self
Creates a new crypt service that supports Starnix user volumes.
Sourcepub fn contains_key(&self, key: EncryptionKeyId) -> bool
pub fn contains_key(&self, key: EncryptionKeyId) -> bool
Returns true if key is registered with the service.
Sourcepub fn get_users_for_key(&self, key: EncryptionKeyId) -> Option<Vec<u32>>
pub fn get_users_for_key(&self, key: EncryptionKeyId) -> Option<Vec<u32>>
Returns the users registered for key.
Sourcepub fn add_wrapping_key(
&self,
raw_key: &[u8],
uid: u32,
) -> Result<EncryptionKeyId, Errno>
pub fn add_wrapping_key( &self, raw_key: &[u8], uid: u32, ) -> Result<EncryptionKeyId, Errno>
Adds the specified wrapping key for user uid.
Sourcepub async fn handle_connection(
&self,
stream: CryptRequestStream,
) -> Result<(), Error>
pub async fn handle_connection( &self, stream: CryptRequestStream, ) -> Result<(), Error>
Serves crypt requests.
Sourcepub fn forget_wrapping_key(
&self,
wrapping_key_id: EncryptionKeyId,
uid: u32,
) -> Result<(), Errno>
pub fn forget_wrapping_key( &self, wrapping_key_id: EncryptionKeyId, uid: u32, ) -> Result<(), Errno>
Removes wrapping_key_id for user uid.
pub fn set_uuid(&self, uuid: [u8; 16])
Auto Trait Implementations§
impl !Freeze for CryptService
impl !RefUnwindSafe for CryptService
impl Send for CryptService
impl Sync for CryptService
impl Unpin for CryptService
impl UnsafeUnpin for CryptService
impl UnwindSafe for CryptService
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more