Struct signatory::Ed25519Signature [−][src]
Ed25519 signatures
Methods
impl Signature
[src]
impl Signature
pub fn new(bytes: [u8; 64]) -> Self
[src]
pub fn new(bytes: [u8; 64]) -> Self
Create an Ed25519 signature from a 32-byte array
pub fn as_bytes(&self) -> &[u8; 64]
[src]
pub fn as_bytes(&self) -> &[u8; 64]
Obtain signature as a byte array reference
pub fn into_bytes(self) -> [u8; 64]
[src]
pub fn into_bytes(self) -> [u8; 64]
Convert signature into owned byte array
Trait Implementations
impl Clone for Signature
[src]
impl Clone for Signature
fn clone(&self) -> Signature
[src]
fn clone(&self) -> Signature
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl AsRef<[u8]> for Signature
[src]
impl AsRef<[u8]> for Signature
impl Debug for Signature
[src]
impl Debug for Signature
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Decode for Signature
[src]
impl Decode for Signature
fn decode<E: Encoding>(
encoded_signature: &[u8],
encoding: &E
) -> Result<Self, Error>
[src]
fn decode<E: Encoding>(
encoded_signature: &[u8],
encoding: &E
) -> Result<Self, Error>
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
S: AsRef<str>,
E: Encoding,
[src]
fn decode_from_str<S, E>(encoded_str: S, encoding: &E) -> Result<Self, Error> where
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]
fn decode_from_reader<R, E>(reader: &mut R, encoding: &E) -> Result<Self, Error> where
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]
fn decode_from_file<P, E>(path: P, encoding: &E) -> Result<Self, Error> where
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 Encode for Signature
[src]
impl Encode for Signature
fn encode<E: Encoding>(&self, encoding: &E) -> Vec<u8>
[src]
fn encode<E: Encoding>(&self, encoding: &E) -> Vec<u8>
Encode an Ed25519 signature with the given encoding (e.g. hex, Base64)
fn encode_to_string<E: Encoding>(&self, encoding: &E) -> Result<String, Error>
[src]
fn encode_to_string<E: Encoding>(&self, encoding: &E) -> Result<String, Error>
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]
fn encode_to_writer<W, E>(
&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]
fn encode_to_file<P, E>(&self, path: P, encoding: &E) -> Result<File, Error> where
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 Eq for Signature
[src]
impl Eq for Signature
impl PartialEq for Signature
[src]
impl PartialEq for Signature
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl SignatureTrait for Signature
[src]
impl SignatureTrait for Signature
Auto Trait Implementations
impl Send for Ed25519Signature
impl Send for Ed25519Signature
impl Sync for Ed25519Signature
impl Sync for Ed25519Signature