pub struct PublicKey { /* private fields */ }
Available on crate feature
caching-sha2-password
only.Implementations§
Source§impl PublicKey
impl PublicKey
pub fn try_from_pkcs1(der: &[u8]) -> Result<Self, Error>
pub fn try_from_pkcs8(der: &[u8]) -> Result<Self, Error>
pub fn try_from_pem(pem: &[u8]) -> Result<Self, Error>
Source§impl PublicKey
impl PublicKey
pub const fn new(modulus: BigUint, exponent: BigUint) -> Self
pub fn num_octets(&self) -> usize
pub fn modulus(&self) -> &BigUint
pub fn exponent(&self) -> &BigUint
pub fn encrypt_padded<R: Rng + CryptoRng>( &self, data: &[u8], padding: OaepPadding<R>, ) -> Result<Vec<u8>, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PublicKey
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnwindSafe for PublicKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more