[][src]Struct ecdsa::asn1::Signature

pub struct Signature<C> where
    C: Curve,
    C::ElementSize: Add + ArrayLength<u8>,
    MaxSize<C>: ArrayLength<u8>,
    <C::ElementSize as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>, 
{ /* fields omitted */ }

ASN.1 DER-encoded signature.

Generic over the scalar size of the elliptic curve.

Implementations

impl<C> Signature<C> where
    C: Curve,
    C::ElementSize: Add + ArrayLength<u8>,
    MaxSize<C>: ArrayLength<u8>,
    <C::ElementSize as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>, 
[src]

pub fn len(&self) -> usize[src]

Get the length of the signature in bytes

Trait Implementations

impl<C> AsRef<[u8]> for Signature<C> where
    C: Curve,
    C::ElementSize: Add + ArrayLength<u8>,
    MaxSize<C>: ArrayLength<u8>,
    <C::ElementSize as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>, 
[src]

impl<C> Debug for Signature<C> where
    C: Curve,
    C::ElementSize: Add + ArrayLength<u8>,
    MaxSize<C>: ArrayLength<u8>,
    <C::ElementSize as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>, 
[src]

impl<C> From<Signature<C>> for Signature<C> where
    C: Curve,
    C::ElementSize: Add + ArrayLength<u8>,
    MaxSize<C>: ArrayLength<u8>,
    <C::ElementSize as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>, 
[src]

impl<C> PrehashSignature for Signature<C> where
    C: Curve + DigestPrimitive,
    C::ElementSize: Add + ArrayLength<u8>,
    MaxSize<C>: ArrayLength<u8>,
    <C::ElementSize as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>, 
[src]

type Digest = C::Digest

Preferred Digest algorithm to use when computing this signature type.

impl<C> Signature for Signature<C> where
    C: Curve,
    C::ElementSize: Add + ArrayLength<u8>,
    MaxSize<C>: ArrayLength<u8>,
    <C::ElementSize as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>, 
[src]

fn from_bytes(bytes: &[u8]) -> Result<Self, Error>[src]

Parse an ASN.1 DER-encoded ECDSA signature from a byte slice

impl<C, '_> TryFrom<&'_ [u8]> for Signature<C> where
    C: Curve,
    C::ElementSize: Add + ArrayLength<u8>,
    MaxSize<C>: ArrayLength<u8>,
    <C::ElementSize as Add>::Output: Add<MaxOverhead> + ArrayLength<u8>, 
[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<C> RefUnwindSafe for Signature<C> where
    <<<<C as Curve>::ElementSize as Add<<C as Curve>::ElementSize>>::Output as Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>>::Output as ArrayLength<u8>>::ArrayType: RefUnwindSafe

impl<C> Send for Signature<C>

impl<C> Sync for Signature<C>

impl<C> Unpin for Signature<C> where
    <<<<C as Curve>::ElementSize as Add<<C as Curve>::ElementSize>>::Output as Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>>::Output as ArrayLength<u8>>::ArrayType: Unpin

impl<C> UnwindSafe for Signature<C> where
    <<<<C as Curve>::ElementSize as Add<<C as Curve>::ElementSize>>::Output as Add<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B1>>>::Output as ArrayLength<u8>>::ArrayType: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.