Trait coins_bip32::ecdsa::signature::SignatureEncoding
source · 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.
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl SignatureEncoding for Signature
impl SignatureEncoding for Signature
source§impl<C> SignatureEncoding for Signature<C>
impl<C> SignatureEncoding for Signature<C>
source§impl<C> SignatureEncoding for Signature<C>
impl<C> SignatureEncoding for Signature<C>
type Repr = GenericArray<u8, <<C as Curve>::FieldBytesSize as Add>::Output>
source§impl<C> SignatureEncoding for SignatureWithOid<C>where
C: DigestPrimitive,
<C as DigestPrimitive>::Digest: AssociatedOid,
<<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
impl<C> SignatureEncoding for SignatureWithOid<C>where
C: DigestPrimitive,
<C as DigestPrimitive>::Digest: AssociatedOid,
<<C as Curve>::FieldBytesSize as Add>::Output: ArrayLength<u8>,
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
.