[−][src]Struct signatory::ed25519::PublicKey
Ed25519 public keys
Methods
impl PublicKey
[src]
impl PublicKey
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 Decode for PublicKey
[src]
impl Decode for PublicKey
fn decode<E: Encoding>(encoded_key: &[u8], encoding: &E) -> Result<Self, Error>
[src]
fn decode<E: Encoding>(encoded_key: &[u8], encoding: &E) -> Result<Self, Error>
Decode an Ed25519 seed 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 PublicKey
[src]
impl Encode for PublicKey
fn encode<E: Encoding>(&self, encoding: &E) -> Vec<u8>
[src]
fn encode<E: Encoding>(&self, encoding: &E) -> Vec<u8>
Encode an Ed25519 seed 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 PublicKey for PublicKey
[src]
impl PublicKey for PublicKey
impl PartialEq<PublicKey> for PublicKey
[src]
impl PartialEq<PublicKey> for PublicKey
impl Eq for PublicKey
[src]
impl Eq for PublicKey
impl Ord for PublicKey
[src]
impl Ord for PublicKey
fn cmp(&self, other: &PublicKey) -> Ordering
[src]
fn cmp(&self, other: &PublicKey) -> Ordering
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialOrd<PublicKey> for PublicKey
[src]
impl PartialOrd<PublicKey> for PublicKey
fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>
fn lt(&self, other: &PublicKey) -> bool
[src]
fn lt(&self, other: &PublicKey) -> bool
fn le(&self, other: &PublicKey) -> bool
[src]
fn le(&self, other: &PublicKey) -> bool
fn gt(&self, other: &PublicKey) -> bool
[src]
fn gt(&self, other: &PublicKey) -> bool
fn ge(&self, other: &PublicKey) -> bool
[src]
fn ge(&self, other: &PublicKey) -> bool
impl Debug for PublicKey
[src]
impl Debug for PublicKey
impl Hash for PublicKey
[src]
impl Hash for PublicKey
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
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 Copy for PublicKey
[src]
impl Copy for PublicKey
impl Clone for PublicKey
[src]
impl Clone for PublicKey
fn clone(&self) -> PublicKey
[src]
fn clone(&self) -> PublicKey
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 PublicKey
[src]
impl AsRef<[u8]> for PublicKey
Auto Trait Implementations
impl Send for Ed25519PublicKey
impl Send for Ed25519PublicKey
impl Sync for Ed25519PublicKey
impl Sync for Ed25519PublicKey
Blanket Implementations
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'_ mut Ifn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self