[][src]Struct signatory_ring::ed25519::Signature

pub struct Signature(pub [u8; 64]);

Ed25519 signatures

Methods

impl Signature[src]

pub fn new(bytes: [u8; 64]) -> Signature[src]

Create an Ed25519 signature from a 32-byte array

pub fn as_bytes(&self) -> &[u8; 64][src]

Obtain signature as a byte array reference

pub fn into_bytes(self) -> [u8; 64][src]

Convert signature into owned byte array

Trait Implementations

impl Clone for Signature[src]

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

Performs copy-assignment from source. Read more

impl Encode for Signature[src]

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

Encode an Ed25519 signature with the given encoding (e.g. hex, Base64)

fn encode_to_string<E>(&self, encoding: &E) -> Result<String, Error> where
    E: Encoding
[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
    E: Encoding,
    W: Write
[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
    E: Encoding,
    P: AsRef<Path>, 
[src]

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

impl Eq for Signature[src]

impl Debug for Signature[src]

impl Signature for Signature[src]

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

Create an Ed25519 signature from its serialized byte representation

fn as_slice(&self) -> &[u8][src]

Borrow this signature as serialized bytes

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

Convert this signature into a byte vector

impl PartialEq<Signature> for Signature[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl Decode for Signature[src]

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

Decode an Ed25519 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
    E: Encoding,
    S: AsRef<str>, 
[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
    E: Encoding,
    R: Read
[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
    E: Encoding,
    P: AsRef<Path>, 
[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 AsRef<[u8]> for Signature[src]

impl Signer<Signature> for Signer[src]

fn sign(&self, msg: &[u8]) -> S[src]

Sign the given message and return a digital signature

impl Verifier<Signature> for Verifier[src]

Auto Trait Implementations

impl Send for Signature

impl Sync for Signature

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