pub struct Key { /* private fields */ }
Expand description
Private account key used to sign requests
Implementations§
Source§impl Key
impl Key
Sourcepub fn generate() -> Result<(Self, PrivateKeyDer<'static>), Error>
pub fn generate() -> Result<(Self, PrivateKeyDer<'static>), Error>
Generate a new ECDSA P-256 key pair
Sourcepub fn from_pkcs8_der(pkcs8_der: PrivatePkcs8KeyDer<'_>) -> Result<Self, Error>
pub fn from_pkcs8_der(pkcs8_der: PrivatePkcs8KeyDer<'_>) -> Result<Self, Error>
Create a new key from the given PKCS#8 DER-encoded private key
Currently, only ECDSA P-256 keys are supported.
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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