#[cfg(test)]
mod digital_signatures {
    use cas_lib::digital_signature::{cas_digital_signature_rsa::{RSADigitalSignature, RSADigitalSignatureResult, SHAED25519DalekDigitalSignatureResult}, sha_256_rsa::SHA256RSADigitalSignature, sha_512_rsa::SHA512RSADigitalSignature};

    #[test]
    pub fn rsa_sha_512_digital_signature_verify() {
        let data_to_sign = b"This is a test of a digital signature".to_vec();
        let result: RSADigitalSignatureResult = SHA512RSADigitalSignature::digital_signature_rsa(2048, data_to_sign.clone());
        let verification = SHA512RSADigitalSignature::verify_rsa(result.public_key, data_to_sign, result.signature);
        assert_eq!(true, verification);
    }

    #[test]
    pub fn rsa_sha_256_digital_signature_verify() {
        let data_to_sign = b"This is a test of a digital signature".to_vec();
        let result: RSADigitalSignatureResult = SHA256RSADigitalSignature::digital_signature_rsa(2048, data_to_sign.clone());
        let verification = SHA256RSADigitalSignature::verify_rsa(result.public_key, data_to_sign, result.signature);
        assert_eq!(true, verification);
    }
}