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 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", so this trait is not object safe.
Implementors§
Source§impl<C> SignatureEncoding for ecdsa::der::Signature<C>where
C: PrimeCurve,
MaxSize<C>: ArrayLength<u8>,
<FieldBytesSize<C> as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>,
impl<C> SignatureEncoding for ecdsa::der::Signature<C>where
C: PrimeCurve,
MaxSize<C>: ArrayLength<u8>,
<FieldBytesSize<C> as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>,
Source§impl<C> SignatureEncoding for ecdsa::Signature<C>
impl<C> SignatureEncoding for ecdsa::Signature<C>
type Repr = GenericArray<u8, <<C as Curve>::FieldBytesSize as Add>::Output>
Source§impl<C> SignatureEncoding for SignatureWithOid<C>
impl<C> SignatureEncoding for SignatureWithOid<C>
NOTE: this implementation assumes the default digest for the given elliptic
curve as defined by hazmat::DigestPrimitive
.
When working with alternative digests, you will need to use e.g.
SignatureWithOid::new_with_digest
.