Trait osshkeys::keys::PublicParts
source · pub trait PublicParts: Key {
// Required methods
fn verify(&self, data: &[u8], sig: &[u8]) -> OsshResult<bool>;
fn blob(&self) -> OsshResult<Vec<u8>>;
// Provided methods
fn fingerprint(&self, hash: FingerprintHash) -> OsshResult<Vec<u8>> { ... }
fn fingerprint_randomart(&self, hash: FingerprintHash) -> OsshResult<String> { ... }
}
Expand description
A trait for operations of a public key
Required Methods§
sourcefn verify(&self, data: &[u8], sig: &[u8]) -> OsshResult<bool>
fn verify(&self, data: &[u8], sig: &[u8]) -> OsshResult<bool>
Verify the data with a detached signature, returning true if the signature is not malformed
sourcefn blob(&self) -> OsshResult<Vec<u8>>
fn blob(&self) -> OsshResult<Vec<u8>>
Return the binary representation of the public key
Provided Methods§
sourcefn fingerprint(&self, hash: FingerprintHash) -> OsshResult<Vec<u8>>
fn fingerprint(&self, hash: FingerprintHash) -> OsshResult<Vec<u8>>
Hash the blob of the public key to generate the fingerprint
sourcefn fingerprint_randomart(&self, hash: FingerprintHash) -> OsshResult<String>
fn fingerprint_randomart(&self, hash: FingerprintHash) -> OsshResult<String>
Draw an ASCII-art picture from the fingerprint, also known as “randomart”