[][src]Struct sodiumoxide::crypto::sign::ed25519::Seed

#[must_use]
pub struct Seed(pub [u8; 32]);

Seed that can be used for keypair generation

The Seed is used by keypair_from_seed() to generate a secret and public signature key.

When a Seed goes out of scope its contents will be zeroed out

Methods

impl Seed[src]

pub fn from_slice(bs: &[u8]) -> Option<Seed>[src]

from_slice() creates an object from a byte slice

This function will fail and return None if the length of the byte-slice isn't equal to the length of the object

Trait Implementations

impl Drop for Seed[src]

impl PartialEq<Seed> for Seed[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Clone for Seed[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Eq for Seed[src]

impl AsRef<[u8]> for Seed[src]

impl Debug for Seed[src]

impl Index<Range<usize>> for Seed[src]

Allows a user to access the byte contents of an object as a slice.

WARNING: it might be tempting to do comparisons on objects by using x[a..b] == y[a..b]. This will open up for timing attacks when comparing for example authenticator tags. Because of this only use the comparison functions exposed by the sodiumoxide API.

type Output = [u8]

The returned type after indexing.

impl Index<RangeTo<usize>> for Seed[src]

Allows a user to access the byte contents of an object as a slice.

WARNING: it might be tempting to do comparisons on objects by using x[..b] == y[..b]. This will open up for timing attacks when comparing for example authenticator tags. Because of this only use the comparison functions exposed by the sodiumoxide API.

type Output = [u8]

The returned type after indexing.

impl Index<RangeFrom<usize>> for Seed[src]

Allows a user to access the byte contents of an object as a slice.

WARNING: it might be tempting to do comparisons on objects by using x[a..] == y[a..]. This will open up for timing attacks when comparing for example authenticator tags. Because of this only use the comparison functions exposed by the sodiumoxide API.

type Output = [u8]

The returned type after indexing.

impl Index<RangeFull> for Seed[src]

Allows a user to access the byte contents of an object as a slice.

WARNING: it might be tempting to do comparisons on objects by using x[] == y[]. This will open up for timing attacks when comparing for example authenticator tags. Because of this only use the comparison functions exposed by the sodiumoxide API.

type Output = [u8]

The returned type after indexing.

impl Serialize for Seed[src]

impl<'de> Deserialize<'de> for Seed[src]

Auto Trait Implementations

impl Send for Seed

impl Unpin for Seed

impl Sync for Seed

impl UnwindSafe for Seed

impl RefUnwindSafe for Seed

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]