SecretHandle
pub struct SecretHandle { /* private fields */ }A low-level interface to a secret.
Methods here are typically exposed as the APIs on
crate::secret_store::Secret and should not be needed directly.
Constants
An invalid secret handle.
Methods
is_invalid
View sourcefn is_invalid(&self) -> boolReturn true if the crate::secret_store::Secret handle is invalid.
Parameters
- self: &Self
Returns
new
View sourceCreate a new "secret" from the given memory. This is not the suggested way to create
Secrets; instead, we suggest using SecretStore::get.
This method can be used for data that should be secret, but is being obtained by
some other means than the secret store. New "secrets" created this way use plaintext
only, and live in the session's memory unencrypted for much longer than secrets
generated by SecretStore::get. They should thus only be used in situations in
which an API requires a Secret, but you cannot (for whatever reason) use a
SecretStore to store them.
Parameters
- secret: &[u8]
Returns