SigningKey

Trait SigningKey 

Source
pub trait SigningKey {
    // Required methods
    fn sign_rs256(&self, message: &[u8]) -> Vec<u8> ;
    fn sign_ps256(&self, message: &[u8]) -> Vec<u8> ;
    fn sign_rs384(&self, message: &[u8]) -> Vec<u8> ;
    fn sign_ps384(&self, message: &[u8]) -> Vec<u8> ;
    fn sign_rs512(&self, message: &[u8]) -> Vec<u8> ;
    fn sign_ps512(&self, message: &[u8]) -> Vec<u8> ;
    fn from_pkcs1_der(der: &[u8]) -> Option<Self>
       where Self: Sized;
    fn from_pkcs8_der(der: &[u8]) -> Option<Self>
       where Self: Sized;
    fn verifying_key(&self) -> Box<dyn VerifyingKey>;
}
Expand description

A signing key using RSA.

Required Methods§

Source

fn sign_rs256(&self, message: &[u8]) -> Vec<u8>

Sign the message using the RS256 parameters.

Source

fn sign_ps256(&self, message: &[u8]) -> Vec<u8>

Sign the message using the PS256 parameters.

Source

fn sign_rs384(&self, message: &[u8]) -> Vec<u8>

Sign the message using the RS384 parameters.

Source

fn sign_ps384(&self, message: &[u8]) -> Vec<u8>

Sign the message using the PS384 parameters.

Source

fn sign_rs512(&self, message: &[u8]) -> Vec<u8>

Sign the message using the RS512 parameters.

Source

fn sign_ps512(&self, message: &[u8]) -> Vec<u8>

Sign the message using the PS512 parameters.

Source

fn from_pkcs1_der(der: &[u8]) -> Option<Self>
where Self: Sized,

Create a new key from a PKCS1 DER.

Source

fn from_pkcs8_der(der: &[u8]) -> Option<Self>
where Self: Sized,

Create a new key from a PKCS8 DER.

Source

fn verifying_key(&self) -> Box<dyn VerifyingKey>

Create a verifying key from this key.

Implementors§