pub struct Signature { /* private fields */ }
Expand description
Container of the DSA signature
Implementations§
Trait Implementations§
source§impl<'a> DecodeValue<'a> for Signature
impl<'a> DecodeValue<'a> for Signature
source§fn decode_value<R: Reader<'a>>(reader: &mut R, header: Header) -> Result<Self>
fn decode_value<R: Reader<'a>>(reader: &mut R, header: Header) -> Result<Self>
Attempt to decode this message using the provided [
Reader
].source§impl<D> DigestSigner<D, Signature> for SigningKeywhere
D: Digest + BlockSizeUser + FixedOutputReset,
impl<D> DigestSigner<D, Signature> for SigningKeywhere
D: Digest + BlockSizeUser + FixedOutputReset,
source§fn try_sign_digest(&self, digest: D) -> Result<Signature, Error>
fn try_sign_digest(&self, digest: D) -> Result<Signature, Error>
Attempt to sign the given prehashed message
Digest
, returning a
digital signature on success, or an error if something went wrong.source§fn sign_digest(&self, digest: D) -> S
fn sign_digest(&self, digest: D) -> S
source§impl<D> DigestVerifier<D, Signature> for VerifyingKeywhere
D: Digest,
impl<D> DigestVerifier<D, Signature> for VerifyingKeywhere
D: Digest,
source§impl EncodeValue for Signature
impl EncodeValue for Signature
source§impl PartialEq for Signature
impl PartialEq for Signature
source§impl PartialOrd for Signature
impl PartialOrd for Signature
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl PrehashSigner<Signature> for SigningKey
impl PrehashSigner<Signature> for SigningKey
source§fn sign_prehash(&self, prehash: &[u8]) -> Result<Signature, Error>
fn sign_prehash(&self, prehash: &[u8]) -> Result<Signature, Error>
Warning: This uses sha2::Sha256
as the hash function for the digest. If you need to use a different one, use SigningKey::sign_prehashed_rfc6979
.
source§impl PrehashVerifier<Signature> for VerifyingKey
impl PrehashVerifier<Signature> for VerifyingKey
source§impl<D> RandomizedDigestSigner<D, Signature> for SigningKeywhere
D: Digest,
impl<D> RandomizedDigestSigner<D, Signature> for SigningKeywhere
D: Digest,
source§fn try_sign_digest_with_rng(
&self,
rng: &mut impl CryptoRngCore,
digest: D
) -> Result<Signature, Error>
fn try_sign_digest_with_rng( &self, rng: &mut impl CryptoRngCore, digest: D ) -> Result<Signature, Error>
Attempt to sign the given prehashed message
Digest
, returning a
digital signature on success, or an error if something went wrong.source§fn sign_digest_with_rng(&self, rng: &mut impl CryptoRngCore, digest: D) -> S
fn sign_digest_with_rng(&self, rng: &mut impl CryptoRngCore, digest: D) -> S
Sign the given prehashed message
Digest
, returning a signature. Read moresource§impl RandomizedPrehashSigner<Signature> for SigningKey
impl RandomizedPrehashSigner<Signature> for SigningKey
source§fn sign_prehash_with_rng(
&self,
rng: &mut impl CryptoRngCore,
prehash: &[u8]
) -> Result<Signature, Error>
fn sign_prehash_with_rng( &self, rng: &mut impl CryptoRngCore, prehash: &[u8] ) -> Result<Signature, Error>
Attempt to sign the given message digest, returning a digital signature
on success, or an error if something went wrong. Read more
source§impl SignatureEncoding for Signature
impl SignatureEncoding for Signature
source§impl Signer<Signature> for SigningKey
impl Signer<Signature> for SigningKey
source§impl Verifier<Signature> for VerifyingKey
impl Verifier<Signature> for VerifyingKey
impl<'a> Sequence<'a> for Signature
Auto Trait Implementations§
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<'a, T> Choice<'a> for Twhere
T: Decode<'a> + FixedTag,
impl<'a, T> Choice<'a> for Twhere
T: Decode<'a> + FixedTag,
§fn can_decode(tag: Tag) -> bool
fn can_decode(tag: Tag) -> bool
Is the provided [
Tag
] decodable as a variant of this CHOICE
?§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere
T: EncodeValue + Tagged,
§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided [Writer
].
§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.
§fn encode_to_vec(&self, buf: &mut Vec<u8>) -> Result<Length, Error>
fn encode_to_vec(&self, buf: &mut Vec<u8>) -> Result<Length, Error>
Encode this message as ASN.1 DER, appending it to the provided
byte vector.