Enum josekit::jws::alg::rsassa_pss::RsassaPssJwsAlgorithm [−][src]
pub enum RsassaPssJwsAlgorithm {
Ps256,
Ps384,
Ps512,
}
Variants
RSASSA-PSS using SHA-256 and MGF1 with SHA-256
RSASSA-PSS using SHA-384 and MGF1 with SHA-384
RSASSA-PSS using SHA-512 and MGF1 with SHA-512
Implementations
Create a RSA-PSS 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-PSS 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#8 PrivateKeyInfo or PKCS#1 RSAPrivateKey that surrounded by “—–BEGIN/END RSA-PSS/RSA PRIVATE KEY––”.
Arguments
input
- A private key of common or traditinal PEM format.
pub fn signer_from_der(
&self,
input: impl AsRef<[u8]>
) -> Result<RsassaPssJwsSigner, JoseError>
pub fn signer_from_der(
&self,
input: impl AsRef<[u8]>
) -> Result<RsassaPssJwsSigner, JoseError>
Return a signer 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.
pub fn signer_from_pem(
&self,
input: impl AsRef<[u8]>
) -> Result<RsassaPssJwsSigner, JoseError>
pub fn signer_from_pem(
&self,
input: impl AsRef<[u8]>
) -> Result<RsassaPssJwsSigner, JoseError>
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 PKCS#8 PrivateKeyInfo or PKCS#1 RSAPrivateKey that surrounded by “—–BEGIN/END RSA-PSS/RSA 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 RSA type.
Arguments
jwk
- A private key that is formatted by a JWK of RSA type.
pub fn verifier_from_der(
&self,
input: impl AsRef<[u8]>
) -> Result<RsassaPssJwsVerifier, JoseError>
pub fn verifier_from_der(
&self,
input: impl AsRef<[u8]>
) -> Result<RsassaPssJwsVerifier, JoseError>
Return a verifier from a public key that is a DER encoded SubjectPublicKeyInfo or PKCS#1 RSAPublicKey.
Arguments
input
- A public key that is a DER encoded SubjectPublicKeyInfo or PKCS#1 RSAPublicKey.
pub fn verifier_from_pem(
&self,
input: impl AsRef<[u8]>
) -> Result<RsassaPssJwsVerifier, JoseError>
pub fn verifier_from_pem(
&self,
input: impl AsRef<[u8]>
) -> Result<RsassaPssJwsVerifier, JoseError>
Return a verifier from a key of common or traditional PEM format.
Common PEM format is a DER and base64 encoded SubjectPublicKeyInfo that surrounded by “—–BEGIN/END PUBLIC KEY––”.
Traditional PEM format is a DER and base64 SubjectPublicKeyInfo or PKCS#1 RSAPublicKey that surrounded by “—–BEGIN/END RSA-PSS/RSA 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 RSA type.
Arguments
jwk
- A public key that is formatted by a JWK of RSA type.
Trait Implementations
type Target = dyn JwsAlgorithm
type Target = dyn JwsAlgorithm
The resulting type after dereferencing.
Auto Trait Implementations
impl RefUnwindSafe for RsassaPssJwsAlgorithm
impl Send for RsassaPssJwsAlgorithm
impl Sync for RsassaPssJwsAlgorithm
impl Unpin for RsassaPssJwsAlgorithm
impl UnwindSafe for RsassaPssJwsAlgorithm
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.