use crate::{
collections::Vector,
rng::CryptoRng,
tls::{SignatureScheme, TlsCtx, TlsCtxSk, TlsMode},
};
#[derive(Clone, Debug, Default)]
pub struct PlaintextCtx {}
impl PlaintextCtx {
#[inline]
pub const fn new() -> Self {
Self {}
}
}
impl TlsCtx for PlaintextCtx {
const TY: TlsMode = TlsMode::PlainText;
}
impl TlsCtxSk for PlaintextCtx {
type Signature = [u8; 0];
#[inline]
fn sign<RNG>(
&self,
_: &mut Vector<u8>,
_: &[u8],
_: &mut RNG,
_: SignatureScheme,
) -> crate::Result<Self::Signature>
where
RNG: CryptoRng,
{
Ok([])
}
}