[−][src]Struct osshkeys::keys::PublicKey
General public key type
This is a type to make it easy to store different types of public key in the container. Each can contain one of the types supported in this crate.
Public key is usually stored in the .pub
file when generating the key.
Methods
impl PublicKey
[src]
pub fn from_keystring(keystr: &str) -> OsshResult<Self>
[src]
Parse the openssh public key file
pub fn keytype(&self) -> KeyType
[src]
Indicate the key type being stored
pub fn comment(&self) -> &str
[src]
Get the comment of the key
pub fn comment_mut(&mut self) -> &mut String
[src]
Get the mutable comment of the key
Trait Implementations
impl Key for PublicKey
[src]
impl PublicPart for PublicKey
[src]
fn blob(&self) -> Result<Vec<u8>, Error>
[src]
fn fingerprint(&self, hash: FingerprintHash) -> Result<Vec<u8>, Error>
[src]
fn verify(&self, data: &[u8], sig: &[u8]) -> Result<bool, Error>
[src]
impl From<RsaPublicKey> for PublicKey
[src]
fn from(inner: RsaPublicKey) -> PublicKey
[src]
impl From<DsaPublicKey> for PublicKey
[src]
fn from(inner: DsaPublicKey) -> PublicKey
[src]
impl From<EcDsaPublicKey> for PublicKey
[src]
fn from(inner: EcDsaPublicKey) -> PublicKey
[src]
impl From<Ed25519PublicKey> for PublicKey
[src]
fn from(inner: Ed25519PublicKey) -> PublicKey
[src]
impl Display for PublicKey
[src]
Auto Trait Implementations
impl Sync for PublicKey
impl Send for PublicKey
impl Unpin for PublicKey
impl RefUnwindSafe for PublicKey
impl UnwindSafe for PublicKey
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self