pub struct KeymintSealedData {
pub sealing_key_info: Vec<u8>,
pub sealing_key_blob: Vec<u8>,
pub sealed_keys: BTreeMap<String, Vec<u8>>,
}Expand description
Bundles together a handle to a Keymint sealing key together with a list of keys sealed by the sealing key. The contents of this struct can be persistently stored, as it contains no plaintext secrets.
Note that it is intentional that this struct does not implement serde::{Serialize, Deserialize}; clients of KeymintSealedKeySource are better equipped to choose an appropriate format and manage versioning.
Fields§
§sealing_key_info: Vec<u8>§sealing_key_blob: Vec<u8>§sealed_keys: BTreeMap<String, Vec<u8>>Implementations§
Source§impl KeymintSealedData
impl KeymintSealedData
Sourcepub async fn new() -> Result<Self, Error>
pub async fn new() -> Result<Self, Error>
Generates a new hardware-backed sealing key based off of sealing_key_info and creates a
new instance of KeymintSealedData which uses this sealing key.
Note that repeated calls to this will yield different sealing keys. The sealing key should be persisted if it needs to be reused.
Sourcepub async fn create_key(&mut self, label: &str) -> Result<Vec<u8>, Error>
pub async fn create_key(&mut self, label: &str) -> Result<Vec<u8>, Error>
Generates and seals a new key named label. Updates this struct to contain the sealed key
(to be retrieved later by Self::unseal_key), and returns the unsealed key.
Sourcepub async fn unseal_key(&self, label: &str) -> Result<Vec<u8>, Error>
pub async fn unseal_key(&self, label: &str) -> Result<Vec<u8>, Error>
Unseals a key previously created via Self::create_key. Returns the unsealed key.
Auto Trait Implementations§
impl Freeze for KeymintSealedData
impl RefUnwindSafe for KeymintSealedData
impl Send for KeymintSealedData
impl Sync for KeymintSealedData
impl Unpin for KeymintSealedData
impl UnwindSafe for KeymintSealedData
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
§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,
§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]§impl<T> IntoAny for T
impl<T> IntoAny for T
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>
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>
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