From 93ae6fc407d98eda73c6e27b1c918c67c67eeb92 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Mon, 27 Mar 2023 03:23:59 +0300 Subject: [PATCH] pss: add function to get salt length from RSA PSS keys To create proper RsaPssParams it is necessary to determine the salt length specified for the signing key. Add a function to get it from signing keys. Signed-off-by: Dmitry Baryshkov --- src/pss.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pss.rs b/src/pss.rs index 6b0ccbf5..cd75fe80 100644 --- a/src/pss.rs +++ b/src/pss.rs @@ -677,6 +677,11 @@ where phantom: Default::default(), }) } + + /// Return specified salt length for this key + pub fn salt_len(&self) -> Option { + self.salt_len + } } impl From for SigningKey @@ -808,6 +813,11 @@ where phantom: Default::default(), } } + + /// Return specified salt length for this key + pub fn salt_len(&self) -> Option { + self.salt_len + } } impl From for BlindedSigningKey