[−][src]Struct signatory::ed25519::PublicKey
Ed25519 public keys
Methods
impl PublicKey
[src]
pub fn new(bytes: [u8; 32]) -> Self
[src]
Create an Ed25519 public key from a 32-byte array
pub fn from_bytes<B>(bytes: B) -> Option<Self> where
B: AsRef<[u8]>,
[src]
B: AsRef<[u8]>,
Create an Ed25519 public key from its serialized (compressed Edwards-y) form
pub fn as_bytes(&self) -> &[u8; 32]
[src]
Obtain public key as a byte array reference
pub fn into_bytes(self) -> [u8; 32]
[src]
Convert public key into owned byte array
Trait Implementations
impl Decode for PublicKey
[src]
fn decode<E: Encoding>(encoded_key: &[u8], encoding: &E) -> Result<Self, Error>
[src]
Decode an Ed25519 public key 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,
fn decode_from_reader<R, E>(reader: &mut R, encoding: &E) -> Result<Self, Error> where
R: Read,
E: Encoding,
[src]
R: Read,
E: Encoding,
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,
impl Encode for PublicKey
[src]
fn encode<E: Encoding>(&self, encoding: &E) -> Vec<u8>
[src]
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_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,
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,
impl PublicKey for PublicKey
[src]
impl Debug for PublicKey
[src]
impl PartialEq<PublicKey> for PublicKey
[src]
impl Eq for PublicKey
[src]
impl Ord for PublicKey
[src]
fn cmp(&self, other: &PublicKey) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialOrd<PublicKey> for PublicKey
[src]
fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>
[src]
fn lt(&self, other: &PublicKey) -> bool
[src]
fn le(&self, other: &PublicKey) -> bool
[src]
fn gt(&self, other: &PublicKey) -> bool
[src]
fn ge(&self, other: &PublicKey) -> bool
[src]
impl Hash for PublicKey
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Copy for PublicKey
[src]
impl AsRef<[u8]> for PublicKey
[src]
impl Clone for PublicKey
[src]
Auto Trait Implementations
impl Unpin for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl UnwindSafe for PublicKey
impl RefUnwindSafe for PublicKey
Blanket Implementations
impl<T> From<T> for T
[src]
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, 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,
fn 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