Struct minisign::PublicKey [−][src]
pub struct PublicKey { /* fields omitted */ }
A PublicKey
is used to verify signatures.
Implementations
impl PublicKey
[src]
impl PublicKey
[src]pub fn keynum(&self) -> &[u8]
[src]
The key identifier of this public key.
pub fn from_bytes(buf: &[u8]) -> Result<PublicKey>
[src]
Deserialize a PublicKey
.
For storage, a PublicKeyBox
is usually what you need instead.
pub fn to_bytes(&self) -> Vec<u8>
[src]
Serialize a PublicKey
.
For storage, a PublicKeyBox
is usually what you want to use instead.
pub fn from_box(pk_box: PublicKeyBox) -> Result<PublicKey>
[src]
Convert a PublicKeyBox
to a PublicKey
.
pub fn to_box(&self) -> Result<PublicKeyBox>
[src]
Convert a PublicKey
to a PublicKeyBox
.
pub fn from_base64(pk_string: &str) -> Result<PublicKey>
[src]
Create a minimal public key from a base64-encoded string.
pub fn to_base64(&self) -> String
[src]
Encode a public key as a base64-encoded string.
pub fn from_file<P>(pk_path: P) -> Result<PublicKey> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Load a PublicKeyBox
from a file, and returns a PublicKey
from it.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PublicKey
impl RefUnwindSafe for PublicKey
impl UnwindSafe for PublicKey
impl UnwindSafe for PublicKey