[−][src]Trait rcrypto::Signature
A trait for signature algorithms
Associated Types
type Output
Required methods
fn sign(
&mut self,
signature: &mut T,
message: &[u8]
) -> Result<Self::Output, CryptoError>
&mut self,
signature: &mut T,
message: &[u8]
) -> Result<Self::Output, CryptoError>
fn verify(
&mut self,
signature: &T,
message: &[u8]
) -> Result<Self::Output, CryptoError>
&mut self,
signature: &T,
message: &[u8]
) -> Result<Self::Output, CryptoError>
Implementors
impl<H, R> Signature<SignatureContent> for DSA<H, R> where
H: Digest,
R: IterSource<u32>,
[src]
H: Digest,
R: IterSource<u32>,
type Output = ()
fn sign(
&mut self,
signature: &mut SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>
[src]
&mut self,
signature: &mut SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>
fn verify(
&mut self,
signature: &SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>
[src]
&mut self,
signature: &SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>
impl<H, R> Signature<SignatureContent> for PKCS1<H, R> where
H: Digest + Any,
R: IterSource<u32>,
[src]
H: Digest + Any,
R: IterSource<u32>,
type Output = ()
fn sign(
&mut self,
signature: &mut SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>
[src]
&mut self,
signature: &mut SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>
the length of message should be less than or equal to self.sign_max_message_len()
fn verify(
&mut self,
signature: &SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>
[src]
&mut self,
signature: &SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>
the length of signature should be equal to self.modulus_len()
impl<H, R> Signature<SignatureContent> for PSS<H, R> where
H: Digest,
R: IterSource<u32>,
[src]
H: Digest,
R: IterSource<u32>,
type Output = ()
fn sign(
&mut self,
signature: &mut SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>
[src]
&mut self,
signature: &mut SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>
the length of message should be less than or equal to self.digest_len() + self.salt_len() + 2
fn verify(
&mut self,
signature: &SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>
[src]
&mut self,
signature: &SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>
the length of signature should be equal to self.modulus_len()
impl<H, R, C> Signature<SignatureContent> for ECDSA<H, R, C> where
H: Digest,
R: IterSource<u32>,
C: EllipticCurve,
[src]
H: Digest,
R: IterSource<u32>,
C: EllipticCurve,
type Output = ()
fn sign(
&mut self,
signature: &mut SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>
[src]
&mut self,
signature: &mut SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>
fn verify(
&mut self,
signature: &SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>
[src]
&mut self,
signature: &SignatureContent,
message: &[u8]
) -> Result<Self::Output, CryptoError>