pub struct SecretKeyBox<'s> { /* private fields */ }
Expand description
A SecretKeyBox
represents a minisign secret key.
also can be output to a string and parse from a str.
Implementations§
Source§impl<'s> SecretKeyBox<'s>
impl<'s> SecretKeyBox<'s>
pub fn from_signing_key( signing_key: SigningKey, kid: &[u8; 8], password: Option<&[u8]>, untrusted_comment: Option<&'s str>, ) -> Result<Self>
Sourcepub fn from_raw_str(s: &'s str) -> Result<Self>
pub fn from_raw_str(s: &'s str) -> Result<Self>
Get the public key from the secret key, without untrusted comment. only one line.
Sourcepub fn from_str(s: &'s str) -> Result<Self>
pub fn from_str(s: &'s str) -> Result<Self>
Parse a SecretKeyBox
from str.
as it store in a file.
Sourcepub fn untrusted_comment(&self) -> Option<&'s str>
pub fn untrusted_comment(&self) -> Option<&'s str>
Get the untrusted comment.
Trait Implementations§
Source§impl<'s> Clone for SecretKeyBox<'s>
impl<'s> Clone for SecretKeyBox<'s>
Source§fn clone(&self) -> SecretKeyBox<'s>
fn clone(&self) -> SecretKeyBox<'s>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'s> Debug for SecretKeyBox<'s>
impl<'s> Debug for SecretKeyBox<'s>
Source§impl Display for SecretKeyBox<'_>
impl Display for SecretKeyBox<'_>
Source§impl<'s> PartialEq for SecretKeyBox<'s>
impl<'s> PartialEq for SecretKeyBox<'s>
impl<'s> Eq for SecretKeyBox<'s>
impl<'s> StructuralPartialEq for SecretKeyBox<'s>
Auto Trait Implementations§
impl<'s> Freeze for SecretKeyBox<'s>
impl<'s> RefUnwindSafe for SecretKeyBox<'s>
impl<'s> Send for SecretKeyBox<'s>
impl<'s> Sync for SecretKeyBox<'s>
impl<'s> Unpin for SecretKeyBox<'s>
impl<'s> UnwindSafe for SecretKeyBox<'s>
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