Struct signatory::Ed25519PublicKey [−][src]
Ed25519 public keys
Methods
impl Ed25519PublicKey
[src]
impl Ed25519PublicKey
pub fn new(bytes: [u8; 32]) -> Self
[src]
pub fn new(bytes: [u8; 32]) -> Self
Create an Ed25519 public key from a 32-byte array
pub fn from_bytes<B>(bytes: B) -> Result<Self, Error> where
B: AsRef<[u8]>,
[src]
pub fn from_bytes<B>(bytes: B) -> Result<Self, Error> where
B: AsRef<[u8]>,
Create an Ed25519 public key from its serialized (compressed Edwards-y) form
pub fn as_bytes(&self) -> &[u8; 32]
[src]
pub fn as_bytes(&self) -> &[u8; 32]
Obtain public key as a byte array reference
pub fn into_bytes(self) -> [u8; 32]
[src]
pub fn into_bytes(self) -> [u8; 32]
Convert public key into owned byte array
Trait Implementations
impl Copy for Ed25519PublicKey
[src]
impl Copy for Ed25519PublicKey
impl Clone for Ed25519PublicKey
[src]
impl Clone for Ed25519PublicKey
fn clone(&self) -> Ed25519PublicKey
[src]
fn clone(&self) -> Ed25519PublicKey
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 Eq for Ed25519PublicKey
[src]
impl Eq for Ed25519PublicKey
impl PartialEq for Ed25519PublicKey
[src]
impl PartialEq for Ed25519PublicKey
fn eq(&self, other: &Ed25519PublicKey) -> bool
[src]
fn eq(&self, other: &Ed25519PublicKey) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Ed25519PublicKey) -> bool
[src]
fn ne(&self, other: &Ed25519PublicKey) -> bool
This method tests for !=
.
impl Hash for Ed25519PublicKey
[src]
impl Hash for Ed25519PublicKey
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl AsRef<[u8]> for Ed25519PublicKey
[src]
impl AsRef<[u8]> for Ed25519PublicKey
impl Debug for Ed25519PublicKey
[src]
impl Debug for Ed25519PublicKey
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 Ed25519PublicKey
[src]
impl Decode for Ed25519PublicKey
fn decode(encoded_key: &[u8], encoding: Encoding) -> Result<Self, Error>
[src]
fn decode(encoded_key: &[u8], encoding: Encoding) -> Result<Self, Error>
Decode an Ed25519 seed from a byte slice with the given encoding (e.g. hex, Base64)
fn decode_from_str<S: AsRef<str>>(
encoded: S,
encoding: Encoding
) -> Result<Self, Error>
[src]
fn decode_from_str<S: AsRef<str>>(
encoded: S,
encoding: Encoding
) -> Result<Self, Error>
Decode the given string-alike type with the provided Encoding
, returning the decoded value or a Error
. Read more
fn decode_from_reader<R: Read>(
reader: &mut R,
encoding: Encoding
) -> Result<Self, Error>
[src]
fn decode_from_reader<R: Read>(
reader: &mut R,
encoding: Encoding
) -> Result<Self, Error>
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: AsRef<Path>>(
path: P,
encoding: Encoding
) -> Result<Self, Error>
[src]
fn decode_from_file<P: AsRef<Path>>(
path: P,
encoding: Encoding
) -> Result<Self, Error>
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 Ed25519PublicKey
[src]
impl Encode for Ed25519PublicKey
fn encode(&self, encoding: Encoding) -> Vec<u8>
[src]
fn encode(&self, encoding: Encoding) -> Vec<u8>
Encode an Ed25519 seed with the given encoding (e.g. hex, Base64)
fn encode_to_string<S: AsRef<str>>(&self, encoding: Encoding) -> String
[src]
fn encode_to_string<S: AsRef<str>>(&self, encoding: Encoding) -> String
Encode the given string-alike type with the provided Encoding
, returning the encoded value or a Error
. Read more
fn encode_to_writer<W: Write>(
&self,
writer: &mut W,
encoding: Encoding
) -> Result<usize, Error>
[src]
fn encode_to_writer<W: Write>(
&self,
writer: &mut W,
encoding: Encoding
) -> Result<usize, Error>
Encode the data read to the given io::Read
type with the provided Encoding
, returning the encoded value or a Error
. Read more
fn encode_to_file<P: AsRef<Path>>(
&self,
path: P,
encoding: Encoding
) -> Result<File, Error>
[src]
fn encode_to_file<P: AsRef<Path>>(
&self,
path: P,
encoding: Encoding
) -> Result<File, Error>
Read a file at the given path, decoding the data it contains using the provided Encoding
, returning the encoded value or a Error
. Read more
impl PublicKey for Ed25519PublicKey
[src]
impl PublicKey for Ed25519PublicKey
Auto Trait Implementations
impl Send for Ed25519PublicKey
impl Send for Ed25519PublicKey
impl Sync for Ed25519PublicKey
impl Sync for Ed25519PublicKey