[−][src]Struct signatory::ecdsa::FixedSignature
ECDSA signatures serialized in a compact, fixed-sized form
Methods
impl<C> FixedSignature<C> where
C: WeierstrassCurve,
[src]
C: WeierstrassCurve,
pub fn into_bytes(self) -> GenericArray<u8, C::FixedSignatureSize>
[src]
Convert signature into owned byte array
Trait Implementations
impl<C: WeierstrassCurve> Signature for FixedSignature<C>
[src]
impl<C> Decode for FixedSignature<C> where
C: WeierstrassCurve,
[src]
C: WeierstrassCurve,
fn decode<E: Encoding>(
encoded_signature: &[u8],
encoding: &E
) -> Result<Self, Error>
[src]
encoded_signature: &[u8],
encoding: &E
) -> Result<Self, Error>
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]
S: AsRef<str>,
E: Encoding,
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]
R: Read,
E: Encoding,
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]
P: AsRef<Path>,
E: Encoding,
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 FixedSignature<C> where
C: WeierstrassCurve,
[src]
C: WeierstrassCurve,
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]
&self,
writer: &mut W,
encoding: &E
) -> Result<usize, Error> where
W: Write,
E: Encoding,
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]
P: AsRef<Path>,
E: Encoding,
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<FixedSignature<C>> for FixedSignature<C> where
C::FixedSignatureSize: PartialEq,
[src]
C::FixedSignatureSize: PartialEq,
fn eq(&self, other: &FixedSignature<C>) -> bool
[src]
fn ne(&self, other: &FixedSignature<C>) -> bool
[src]
impl<C: Eq + WeierstrassCurve> Eq for FixedSignature<C> where
C::FixedSignatureSize: Eq,
[src]
C::FixedSignatureSize: Eq,
impl<C> Debug for FixedSignature<C> where
C: WeierstrassCurve,
[src]
C: WeierstrassCurve,
impl<C> AsRef<[u8]> for FixedSignature<C> where
C: WeierstrassCurve,
[src]
C: WeierstrassCurve,
impl<'s, C> From<&'s FixedSignature<C>> for Asn1Signature<C> where
C: WeierstrassCurve,
[src]
C: WeierstrassCurve,
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]
C: WeierstrassCurve,
fn from(asn1_signature: &Asn1Signature<C>) -> FixedSignature<C>
[src]
impl<C> From<GenericArray<u8, <C as WeierstrassCurve>::FixedSignatureSize>> for FixedSignature<C> where
C: WeierstrassCurve,
[src]
C: WeierstrassCurve,
fn from(bytes: GenericArray<u8, C::FixedSignatureSize>) -> Self
[src]
impl<C: Clone + WeierstrassCurve> Clone for FixedSignature<C> where
C::FixedSignatureSize: Clone,
[src]
C::FixedSignatureSize: Clone,
fn clone(&self) -> FixedSignature<C>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<C> Signature for FixedSignature<C> where
C: WeierstrassCurve,
[src]
C: WeierstrassCurve,
Auto Trait Implementations
impl<C> Send for FixedSignature<C> where
<C as WeierstrassCurve>::FixedSignatureSize: ArrayLength<u8>,
<C as WeierstrassCurve>::FixedSignatureSize: ArrayLength<u8>,
impl<C> Sync for FixedSignature<C> where
<C as WeierstrassCurve>::FixedSignatureSize: ArrayLength<u8>,
<C as WeierstrassCurve>::FixedSignatureSize: ArrayLength<u8>,
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
ⓘImportant traits for &'_ mut Ifn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self