#[cfg(feature = "crypto-aws-lc-rs")]
mod aws_lc_rs;
#[cfg(feature = "crypto-graviola")]
mod graviola;
#[cfg(feature = "crypto-openssl")]
mod openssl;
#[cfg(feature = "crypto-ring")]
mod ring;
use crate::{crypto::dummy_impl_call, rng::CryptoRng};
pub trait SignKey: Sized {
fn from_pkcs8(bytes: &[u8]) -> crate::Result<Self>;
fn generate<RNG>(rng: &mut RNG) -> crate::Result<Self>
where
RNG: CryptoRng;
}
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct SignKeyDummy;
impl SignKey for SignKeyDummy {
#[inline]
fn from_pkcs8(_: &[u8]) -> crate::Result<Self> {
dummy_impl_call();
}
#[inline]
fn generate<RNG>(_: &mut RNG) -> crate::Result<Self>
where
RNG: CryptoRng,
{
dummy_impl_call();
}
}