Struct josekit::jwk::alg::rsapss::RsaPssKeyPair [−][src]
pub struct RsaPssKeyPair { /* fields omitted */ }
Implementations
pub fn generate(
bits: u32,
hash: HashAlgorithm,
mgf1_hash: HashAlgorithm,
salt_len: u8
) -> Result<RsaPssKeyPair, JoseError>
pub fn generate(
bits: u32,
hash: HashAlgorithm,
mgf1_hash: HashAlgorithm,
salt_len: u8
) -> Result<RsaPssKeyPair, JoseError>
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.hash
A hash algorithm for signingmgf1_hash
A hash algorithm for MGF1salt_len
A salt length
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.hash
A hash algorithm for signingmgf1_hash
A hash algorithm for MGF1salt_len
A salt length
pub fn from_jwk(
jwk: &Jwk,
hash: HashAlgorithm,
mgf1_hash: HashAlgorithm,
salt_len: u8
) -> Result<Self, JoseError>
pub fn from_jwk(
jwk: &Jwk,
hash: HashAlgorithm,
mgf1_hash: HashAlgorithm,
salt_len: u8
) -> Result<Self, JoseError>
Create a RSA-PSS key pair 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.hash
A hash algorithm for signingmgf1_hash
A hash algorithm for MGF1salt_len
A salt length
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RsaPssKeyPair
impl Send for RsaPssKeyPair
impl Sync for RsaPssKeyPair
impl Unpin for RsaPssKeyPair
impl UnwindSafe for RsaPssKeyPair
Blanket Implementations
Mutably borrows from an owned value. Read more