Struct minisign::SecretKey [−][src]
pub struct SecretKey { /* fields omitted */ }
A SecretKey
is used to create signatures.
Implementations
impl SecretKey
[src]
impl SecretKey
[src]pub fn keynum(&self) -> &[u8]
[src]
The key identifier of this secret key.
pub fn from_bytes(bytes_buf: &[u8]) -> Result<SecretKey>
[src]
Deserialize a SecretKey
.
For storage, a SecretKeyBox
is usually what you need instead.
pub fn to_bytes(&self) -> Vec<u8>
[src]
Serialize a SecretKey
.
For storage, a SecretKeyBox
is usually what you need instead.
pub fn from_box(
sk_box: SecretKeyBox,
password: Option<String>
) -> Result<SecretKey>
[src]
sk_box: SecretKeyBox,
password: Option<String>
) -> Result<SecretKey>
Convert a SecretKeyBox
to a SecretKey
.
pub fn to_box(&self, comment: Option<&str>) -> Result<SecretKeyBox>
[src]
Convert a SecretKey
to a SecretKeyBox
.
pub fn from_file<P: AsRef<Path>>(
sk_path: P,
password: Option<String>
) -> Result<SecretKey>
[src]
sk_path: P,
password: Option<String>
) -> Result<SecretKey>
Load a SecretKeyBox
from a file, and returns a SecretKey
from it.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SecretKey
impl RefUnwindSafe for SecretKey
impl UnwindSafe for SecretKey
impl UnwindSafe for SecretKey