[][src]Struct signatory::ecdsa::Asn1Signature

pub struct Asn1Signature<C: WeierstrassCurve> { /* fields omitted */ }

ECDSA signatures encoded as ASN.1 DER

Trait Implementations

impl<C: WeierstrassCurve> Signature for Asn1Signature<C>[src]

impl<C> Decode for Asn1Signature<C> where
    C: WeierstrassCurve
[src]

fn decode<E: Encoding>(
    encoded_signature: &[u8],
    encoding: &E
) -> Result<Self, Error>
[src]

Decode an ASN.1 encoded ECDSA signature from a byte slice with the given encoding (e.g. hex, Base64)

fn decode_from_str<S, E>(encoded_str: S, encoding: &E) -> Result<Self, Error> where
    S: AsRef<str>,
    E: Encoding
[src]

Decode the given string-alike type with the provided Encoding, returning the decoded value or a Error. Read more

fn decode_from_reader<R, E>(reader: &mut R, encoding: &E) -> Result<Self, Error> where
    R: Read,
    E: Encoding
[src]

Decode the data read from the given io::Read type with the provided Encoding, returning the decoded value or a Error. Read more

fn decode_from_file<P, E>(path: P, encoding: &E) -> Result<Self, Error> where
    P: AsRef<Path>,
    E: Encoding
[src]

Read a file at the given path, decoding the data it contains using the provided Encoding, returning the decoded value or a Error. Read more

impl<C> Encode for Asn1Signature<C> where
    C: WeierstrassCurve
[src]

Important traits for Vec<u8>
fn encode<E: Encoding>(&self, encoding: &E) -> Vec<u8>[src]

Encode an ASN.1 encoded ECDSA signature with the given encoding (e.g. hex, Base64)

fn encode_to_string<E: Encoding>(&self, encoding: &E) -> Result<String, Error>[src]

Encode self to a String using the provided Encoding, returning the encoded value or a Error. Read more

fn encode_to_writer<W, E>(
    &self,
    writer: &mut W,
    encoding: &E
) -> Result<usize, Error> where
    W: Write,
    E: Encoding
[src]

Encode self with the given Encoding, writing the result to the supplied io::Write type, returning the number of bytes written or a Error. Read more

fn encode_to_file<P, E>(&self, path: P, encoding: &E) -> Result<File, Error> where
    P: AsRef<Path>,
    E: Encoding
[src]

Encode self and write it to a file at the given path, returning the resulting File or a Error. Read more

impl<C: PartialEq + WeierstrassCurve> PartialEq<Asn1Signature<C>> for Asn1Signature<C> where
    C::Asn1SignatureMaxSize: PartialEq
[src]

impl<C: Eq + WeierstrassCurve> Eq for Asn1Signature<C> where
    C::Asn1SignatureMaxSize: Eq
[src]

impl<C> Debug for Asn1Signature<C> where
    C: WeierstrassCurve
[src]

impl<C> AsRef<[u8]> for Asn1Signature<C> where
    C: WeierstrassCurve
[src]

impl<'s, C> From<&'s FixedSignature<C>> for Asn1Signature<C> where
    C: WeierstrassCurve
[src]

fn from(fixed_signature: &FixedSignature<C>) -> Self[src]

Parse r and s values from a fixed-width signature and reserialize them as ASN.1 DER.

impl<'s, C> From<&'s Asn1Signature<C>> for FixedSignature<C> where
    C: WeierstrassCurve
[src]

impl<C: Clone + WeierstrassCurve> Clone for Asn1Signature<C> where
    C::Asn1SignatureMaxSize: Clone
[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<C> Signature for Asn1Signature<C> where
    C: WeierstrassCurve
[src]

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

Decode an ASN.1 DER-serialized ECDSA signature

Important traits for &'_ [u8]
fn as_slice(&self) -> &[u8][src]

Borrow this signature as serialized bytes

Important traits for Vec<u8>
fn into_vec(self) -> Vec<u8>[src]

Convert this signature into a byte vector

Auto Trait Implementations

impl<C> Send for Asn1Signature<C> where
    <C as WeierstrassCurve>::Asn1SignatureMaxSize: ArrayLength<u8>, 

impl<C> Sync for Asn1Signature<C> where
    <C as WeierstrassCurve>::Asn1SignatureMaxSize: ArrayLength<u8>, 

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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.

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> Same<T> for T

type Output = T

Should always be Self