pub struct KeyPair { /* private fields */ }Expand description
A signature key pair. The PKCS#8 encoding is held zeroizing.
Implementations§
Source§impl KeyPair
impl KeyPair
Sourcepub fn from_pkcs8(a: S, der: &[u8]) -> Result<KeyPair, CryptoError>
pub fn from_pkcs8(a: S, der: &[u8]) -> Result<KeyPair, CryptoError>
Loads a PKCS#8 key, refusing one that is not of algorithm a, including an RSA key whose
modulus is not exactly a’s bit length or whose public exponent is not 65537.
Sourcepub fn public_key(&self) -> Vec<u8> ⓘ
pub fn public_key(&self) -> Vec<u8> ⓘ
The raw public key: the bytes of the SubjectPublicKeyInfo subjectPublicKey BIT STRING.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for KeyPair
impl !UnwindSafe for KeyPair
impl Freeze for KeyPair
impl Send for KeyPair
impl Sync for KeyPair
impl Unpin for KeyPair
impl UnsafeUnpin for KeyPair
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