[−][src]Struct signatory::ed25519::Seed
Ed25519 seeds: derivation secrets for Ed25519 private scalars/nonce prefixes
Implementations
impl Seed
[src]
pub fn new(bytes: [u8; 32]) -> Self
[src]
Create an Ed25519 seed from a 32-byte array
pub fn generate() -> Self
[src]
Generate a new Ed25519 seed using the operating system's cryptographically secure random number generator
pub fn from_bytes<B>(bytes: B) -> Option<Self> where
B: AsRef<[u8]>,
[src]
B: AsRef<[u8]>,
Create an Ed25519 seed from a byte slice, returning KeyInvalid
if the
slice is not the correct size (32-bytes)
pub fn from_keypair(keypair: &[u8]) -> Option<Self>
[src]
Create an Ed25519 seed from a keypair: i.e. a seed and its assocaited public key (i.e. compressed Edwards-y coordinate)
pub fn decode_keypair<E: Encoding>(
encoded_keypair: &[u8],
encoding: &E
) -> Result<Self, Error>
[src]
encoded_keypair: &[u8],
encoding: &E
) -> Result<Self, Error>
Decode a Seed
from an encoded (hex or Base64) Ed25519 keypair
pub fn as_secret_slice(&self) -> &[u8]
[src]
Expose the secret values of the Seed
as a byte slice
Trait Implementations
impl Clone for Seed
[src]
impl Decode for Seed
[src]
fn decode<E: Encoding>(encoded_seed: &[u8], encoding: &E) -> Result<Self, Error>
[src]
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]
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 Drop for Seed
[src]
impl Encode for Seed
[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 From<[u8; 32]> for Seed
[src]
Auto Trait Implementations
impl RefUnwindSafe for Seed
impl Send for Seed
impl Sync for Seed
impl Unpin for Seed
impl UnwindSafe for Seed
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,