pub trait SignatureEncoding:
Sized
+ Clone
+ for<'a> TryFrom<&'a [u8]>
+ TryInto<Self::Repr> {
type Repr: 'static + AsRef<[u8]> + Clone + Send + Sync;
// Provided methods
fn to_bytes(&self) -> Self::Repr { ... }
fn to_vec(&self) -> Vec<u8> ⓘ { ... }
fn encoded_len(&self) -> usize { ... }
}Expand description
Support for decoding/encoding signatures as bytes.
Required Associated Types§
Provided Methods§
Sourcefn to_vec(&self) -> Vec<u8> ⓘ
Available on crate feature alloc only.
fn to_vec(&self) -> Vec<u8> ⓘ
alloc only.Encode signature as a byte vector.
Sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Get the length of this signature when encoded.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl<C> SignatureEncoding for ecdsa::Signature<C>where
C: EcdsaCurve,
impl<C> SignatureEncoding for ecdsa::Signature<C>where
C: EcdsaCurve,
Source§impl<C> SignatureEncoding for ecdsa::der::Signature<C>where
C: EcdsaCurve,
MaxSize<C>: ArraySize,
<FieldBytesSize<C> as Add>::Output: Add<MaxOverhead> + ArraySize,
Available on crate features alloc and der only.
impl<C> SignatureEncoding for ecdsa::der::Signature<C>where
C: EcdsaCurve,
MaxSize<C>: ArraySize,
<FieldBytesSize<C> as Add>::Output: Add<MaxOverhead> + ArraySize,
Available on crate features
alloc and der only.Source§impl<C> SignatureEncoding for SignatureWithOid<C>
Available on crate feature digest only.NOTE: this implementation assumes the default digest for the given elliptic
curve as defined by DigestAlgorithm.
impl<C> SignatureEncoding for SignatureWithOid<C>
Available on crate feature
digest only.NOTE: this implementation assumes the default digest for the given elliptic
curve as defined by DigestAlgorithm.
When working with alternative digests, you will need to use e.g.
SignatureWithOid::new_with_digest.