Struct jwtk::ecdsa::EcdsaPrivateKey
source · [−]pub struct EcdsaPrivateKey { /* private fields */ }
Implementations
sourceimpl EcdsaPrivateKey
impl EcdsaPrivateKey
pub fn generate(algorithm: EcdsaAlgorithm) -> Result<Self>
pub fn from_private_components(
algorithm: EcdsaAlgorithm,
d: &[u8],
x: &[u8],
y: &[u8]
) -> Result<Self>
pub fn from_pem(pem: &[u8]) -> Result<Self>
pub fn private_key_to_pem_pkcs8(&self) -> Result<String>
pub fn public_key_to_pem(&self) -> Result<String>
sourcepub fn coordinates(&self) -> Result<(Vec<u8>, Vec<u8>)>
pub fn coordinates(&self) -> Result<(Vec<u8>, Vec<u8>)>
Public key X Y coordinates. Always padded to the full size.
pub fn d(&self) -> Result<Vec<u8>>
Trait Implementations
sourceimpl Clone for EcdsaPrivateKey
impl Clone for EcdsaPrivateKey
sourcefn clone(&self) -> EcdsaPrivateKey
fn clone(&self) -> EcdsaPrivateKey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for EcdsaPrivateKey
impl Debug for EcdsaPrivateKey
sourceimpl From<EcdsaPrivateKey> for SomePrivateKey
impl From<EcdsaPrivateKey> for SomePrivateKey
sourcefn from(k: EcdsaPrivateKey) -> SomePrivateKey
fn from(k: EcdsaPrivateKey) -> SomePrivateKey
Converts to this type from the input type.
sourceimpl PrivateKeyToJwk for EcdsaPrivateKey
impl PrivateKeyToJwk for EcdsaPrivateKey
fn private_key_to_jwk(&self) -> Result<Jwk>
sourceimpl PublicKeyToJwk for EcdsaPrivateKey
impl PublicKeyToJwk for EcdsaPrivateKey
fn public_key_to_jwk(&self) -> Result<Jwk>
sourceimpl SigningKey for EcdsaPrivateKey
impl SigningKey for EcdsaPrivateKey
Auto Trait Implementations
impl RefUnwindSafe for EcdsaPrivateKey
impl Send for EcdsaPrivateKey
impl Sync for EcdsaPrivateKey
impl Unpin for EcdsaPrivateKey
impl UnwindSafe for EcdsaPrivateKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more