Enum josekit::jwe::alg::rsaes::RsaesJweAlgorithm [−][src]
pub enum RsaesJweAlgorithm {
Rsa1_5,
RsaOaep,
RsaOaep256,
RsaOaep384,
RsaOaep512,
}
Variants
This algorithm is no longer recommended.
RSAES-PKCS1-v1_5
RSAES OAEP using default parameters
RSAES OAEP using SHA-256 and MGF1 with SHA-256
RSAES OAEP using SHA-384 and MGF1 with SHA-384
RSAES OAEP using SHA-512 and MGF1 with SHA-512
Implementations
Create a RSA key pair from a private key that is a DER encoded PKCS#8 PrivateKeyInfo or PKCS#1 RSAPrivateKey.
Arguments
input
- A private key that is a DER encoded PKCS#8 PrivateKeyInfo or PKCS#1 RSAPrivateKey.
Create a RSA 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 PKCS#1 RSAPrivateKey that surrounded by “—–BEGIN/END RSA PRIVATE KEY––”.
Arguments
input
- A private key of common or traditinal PEM format.
pub fn encrypter_from_der(
&self,
input: impl AsRef<[u8]>
) -> Result<RsaesJweEncrypter, JoseError>
pub fn encrypter_from_pem(
&self,
input: impl AsRef<[u8]>
) -> Result<RsaesJweEncrypter, JoseError>
pub fn decrypter_from_der(
&self,
input: impl AsRef<[u8]>
) -> Result<RsaesJweDecrypter, JoseError>
pub fn decrypter_from_pem(
&self,
input: impl AsRef<[u8]>
) -> Result<RsaesJweDecrypter, JoseError>
Trait Implementations
type Target = dyn JweAlgorithm
type Target = dyn JweAlgorithm
The resulting type after dereferencing.
Auto Trait Implementations
impl RefUnwindSafe for RsaesJweAlgorithm
impl Send for RsaesJweAlgorithm
impl Sync for RsaesJweAlgorithm
impl Unpin for RsaesJweAlgorithm
impl UnwindSafe for RsaesJweAlgorithm
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.