pub struct RsaPssPrivateKey<'a> { /* private fields */ }
Expand description
An RSA-PSS private key.
The private key holds a RsaPssPublicKey
with the public modulus.
A [Algorithm::RsaPss
] private key.
Implementations§
Source§impl<'a> RsaPssPrivateKey<'a>
impl<'a> RsaPssPrivateKey<'a>
Sourcepub fn new(pk: &'a RsaPssPublicKey, d: &[u8]) -> Result<Self, Error>
pub fn new(pk: &'a RsaPssPublicKey, d: &[u8]) -> Result<Self, Error>
Create a new RsaPssPrivateKey
from a byte slice and a public key.
Returns an error if the length of the byte slice is not equal to the key/modulus size.
Sourcepub fn sign(
&self,
hash_algorithm: DigestAlgorithm,
salt: &[u8],
msg: &[u8],
) -> Result<RsaPssSignature, Error>
pub fn sign( &self, hash_algorithm: DigestAlgorithm, salt: &[u8], msg: &[u8], ) -> Result<RsaPssSignature, Error>
Sign the provided msg
with the private_key
using the hash_algorithm
and salt
.
Returns an error if any of the inputs are invalid and the signature as byte array.
Auto Trait Implementations§
impl<'a> Freeze for RsaPssPrivateKey<'a>
impl<'a> RefUnwindSafe for RsaPssPrivateKey<'a>
impl<'a> Send for RsaPssPrivateKey<'a>
impl<'a> Sync for RsaPssPrivateKey<'a>
impl<'a> Unpin for RsaPssPrivateKey<'a>
impl<'a> UnwindSafe for RsaPssPrivateKey<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more