Struct blind_rsa_signatures::PublicKey
source · pub struct PublicKey(pub RsaPublicKey);
Expand description
An RSA public key
Tuple Fields§
§0: RsaPublicKey
Implementations§
source§impl PublicKey
impl PublicKey
pub fn to_der(&self) -> Result<Vec<u8>, Error>
pub fn from_der(der: &[u8]) -> Result<Self, Error>
pub fn to_pem(&self) -> Result<String, Error>
pub fn from_pem(pem: &str) -> Result<Self, Error>
pub fn to_spki(&self, options: Option<&Options>) -> Result<Vec<u8>, Error>
pub fn from_spki(spki: &[u8], _options: Option<&Options>) -> Result<Self, Error>
sourcepub fn blind<R: CryptoRng + RngCore>(
&self,
rng: &mut R,
msg: impl AsRef<[u8]>,
randomize_message: bool,
options: &Options
) -> Result<BlindingResult, Error>
pub fn blind<R: CryptoRng + RngCore>( &self, rng: &mut R, msg: impl AsRef<[u8]>, randomize_message: bool, options: &Options ) -> Result<BlindingResult, Error>
Blind a message (after optional randomization) to be signed
Methods from Deref<Target = RsaPublicKey>§
pub const MIN_PUB_EXPONENT: u64 = 2u64
pub const MAX_PUB_EXPONENT: u64 = 8_589_934_591u64
pub const MAX_SIZE: usize = 4_096usize
Trait Implementations§
source§impl AsRef<RsaPublicKey> for PublicKey
impl AsRef<RsaPublicKey> for PublicKey
source§fn as_ref(&self) -> &RsaPublicKey
fn as_ref(&self) -> &RsaPublicKey
Converts this type into a shared reference of the (usually inferred) input type.
source§impl From<PublicKey> for RsaPublicKey
impl From<PublicKey> for RsaPublicKey
source§impl From<RsaPublicKey> for PublicKey
impl From<RsaPublicKey> for PublicKey
source§fn from(original: RsaPublicKey) -> PublicKey
fn from(original: RsaPublicKey) -> PublicKey
Converts to this type from the input type.