Struct botan::Pubkey [−][src]
A public key object
Implementations
impl Pubkey
[src]
pub fn load_der(der: &[u8]) -> Result<Pubkey>
[src]
Load a DER encoded public key
pub fn load_pem(pem: &str) -> Result<Pubkey>
[src]
Load a PEM encoded public key
pub fn load_rsa(n: &MPI, e: &MPI) -> Result<Pubkey>
[src]
Load an RSA public key (n,e)
pub fn load_dh(p: &MPI, g: &MPI, y: &MPI) -> Result<Pubkey>
[src]
Load an DH public key (p,g,y)
pub fn load_ecdsa(pub_x: &MPI, pub_y: &MPI, curve_name: &str) -> Result<Pubkey>
[src]
Load an ECDSA public key (x,y) for the specified curve
pub fn load_ecdh(pub_x: &MPI, pub_y: &MPI, curve_name: &str) -> Result<Pubkey>
[src]
Load an ECDH public key (x,y) for the specified curve
pub fn load_ed25519(key: &[u8]) -> Result<Pubkey>
[src]
Load an Ed25519 public key
pub fn load_x25519(key: &[u8]) -> Result<Pubkey>
[src]
Load an X25519 key
pub fn estimated_strength(&self) -> Result<usize>
[src]
Return estimated bit strength of this key
pub fn check_key(&self, rng: &RandomNumberGenerator) -> Result<bool>
[src]
Check key for problems
pub fn fingerprint(&self, hash: &str) -> Result<String>
[src]
Return hash of the public key data
pub fn der_encode(&self) -> Result<Vec<u8>>
[src]
DER encode this public key
pub fn pem_encode(&self) -> Result<String>
[src]
PEM encode this public key
pub fn algo_name(&self) -> Result<String>
[src]
Return the name of the algorithm
pub fn get_field(&self, which: &str) -> Result<MPI>
[src]
Get a value for the public key The which parameter selects a field which is algorithm specific
pub fn get_ed25519_key(&self) -> Result<Vec<u8>>
[src]
Return the 32-byte Ed25519 public key
pub fn get_x25519_key(&self) -> Result<Vec<u8>>
[src]
Get the X25519 public key
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Pubkey
impl !Send for Pubkey
impl !Sync for Pubkey
impl Unpin for Pubkey
impl UnwindSafe for Pubkey
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub 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>,