Enum josekit::jwe::alg::ecdh_es::EcdhEsJweAlgorithm [−][src]
pub enum EcdhEsJweAlgorithm {
EcdhEs,
EcdhEsA128kw,
EcdhEsA192kw,
EcdhEsA256kw,
}
Variants
Elliptic Curve Diffie-Hellman Ephemeral Static key agreement using Concat KDF
ECDH-ES using Concat KDF and CEK wrapped with “A128KW”
ECDH-ES using Concat KDF and CEK wrapped with “A192KW”
ECDH-ES using Concat KDF and CEK wrapped with “A256KW”
Implementations
Generate EC key pair for ECDH.
Generate ECx key pair for ECDH.
Create a EC key pair for ECDH 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 ECx key pair for ECDH from a private key that is a DER encoded PKCS#8 PrivateKeyInfo.
Arguments
input
- A private key that is a DER encoded PKCS#8 PrivateKeyInfo.
Create a EC key pair for ECDH 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.
Create a ECx key pair for ECDH 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 X25519/X448 PRIVATE KEY––”.
Arguments
input
- A private key of common or traditinal PEM format.
pub fn encrypter_from_der(
&self,
input: impl AsRef<[u8]>
) -> Result<EcdhEsJweEncrypter, JoseError>
pub fn encrypter_from_pem(
&self,
input: impl AsRef<[u8]>
) -> Result<EcdhEsJweEncrypter, JoseError>
pub fn decrypter_from_der(
&self,
input: impl AsRef<[u8]>
) -> Result<EcdhEsJweDecrypter, JoseError>
pub fn decrypter_from_pem(
&self,
input: impl AsRef<[u8]>
) -> Result<EcdhEsJweDecrypter, JoseError>
Trait Implementations
type Target = dyn JweAlgorithm
type Target = dyn JweAlgorithm
The resulting type after dereferencing.
Auto Trait Implementations
impl RefUnwindSafe for EcdhEsJweAlgorithm
impl Send for EcdhEsJweAlgorithm
impl Sync for EcdhEsJweAlgorithm
impl Unpin for EcdhEsJweAlgorithm
impl UnwindSafe for EcdhEsJweAlgorithm
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.