Enum josekit::jws::alg::ecdsa::EcdsaJwsAlgorithm[][src]

pub enum EcdsaJwsAlgorithm {
    Es256,
    Es384,
    Es512,
    Es256k,
}

Variants

Es256

ECDSA using P-256 and SHA-256

Es384

ECDSA using P-384 and SHA-384

Es512

ECDSA using P-521 and SHA-512

Es256k

ECDSA using secp256k1 curve and SHA-256

Implementations

Generate ECDSA key pair.

Create a EcDSA key pair from a private key that is a DER encoded PKCS#8 PrivateKeyInfo or ECPrivateKey.

Arguments
  • input - A private key that is a DER encoded PKCS#8 PrivateKeyInfo or ECPrivateKey.

Create a EcDSA key pair from a private key of common or traditinal PEM format.

Common PEM format is a DER and base64 encoded PKCS#8 PrivateKeyInfo that surrounded by “—–BEGIN/END PRIVATE KEY––”.

Traditional PEM format is a DER and base64 encoded ECPrivateKey that surrounded by “—–BEGIN/END EC PRIVATE KEY––”.

Arguments
  • input - A private key of common or traditinal PEM format.

Return a signer from a private key that is a DER encoded PKCS#8 PrivateKeyInfo or ECPrivateKey.

Arguments
  • input - A private key that is a DER encoded PKCS#8 PrivateKeyInfo or ECPrivateKey.

Return a signer from a private key of common or traditinal PEM format.

Common PEM format is a DER and base64 encoded PKCS#8 PrivateKeyInfo that surrounded by “—–BEGIN/END PRIVATE KEY––”.

Traditional PEM format is a DER and base64 encoded ECPrivateKey that surrounded by “—–BEGIN/END EC PRIVATE KEY––”.

Arguments
  • input - A private key of common or traditinal PEM format.

Return a signer from a private key that is formatted by a JWK of EC type.

Arguments
  • jwk - A private key that is formatted by a JWK of EC type.

Return a verifier from a public key that is a DER encoded SubjectPublicKeyInfo.

Arguments
  • input - A public key that is a DER encoded SubjectPublicKeyInfo.

Return a verifier from a key of common PEM format.

Common PEM format is a DER and base64 encoded SubjectPublicKeyInfo that surrounded by “—–BEGIN/END PUBLIC KEY––”.

Arguments
  • input - A public key of common or traditional PEM format.

Return a verifier from a public key that is formatted by a JWK of EC type.

Arguments
  • jwk - A public key that is formatted by a JWK of EC type.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Formats the value using the given formatter. Read more

Return the “alg” (algorithm) header parameter value of JWS.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.