Skip to main content

CASRSAEncryption

Trait CASRSAEncryption 

Source
pub trait CASRSAEncryption {
    // Required methods
    fn generate_rsa_keys(key_size: usize) -> CasResult<RSAKeyPairResult>;
    fn sign(private_key: String, hash: Vec<u8>) -> CasResult<Vec<u8>>;
    fn verify(
        public_key: String,
        hash: Vec<u8>,
        signed_text: Vec<u8>,
    ) -> CasResult<bool>;
}

Required Methods§

Source

fn generate_rsa_keys(key_size: usize) -> CasResult<RSAKeyPairResult>

Source

fn sign(private_key: String, hash: Vec<u8>) -> CasResult<Vec<u8>>

Source

fn verify( public_key: String, hash: Vec<u8>, signed_text: Vec<u8>, ) -> CasResult<bool>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§