pub struct Seed(/* private fields */);Expand description
32-byte identity seed. The Ed25519 keypair derives from this value.
Implementations§
Source§impl Seed
impl Seed
Sourcepub fn from_bytes(bytes: [u8; 32]) -> Self
pub fn from_bytes(bytes: [u8; 32]) -> Self
Wrap a known 32-byte seed (used by lazy migration where the seed is the legacy Argon2id-derived key).
Sourcepub fn from_derived_key(key: &DerivedKey) -> Self
pub fn from_derived_key(key: &DerivedKey) -> Self
Construct a seed from an Argon2id DerivedKey (used by lazy
migration: legacy KEK_passphrase becomes the seed).
pub fn as_bytes(&self) -> &[u8; 32]
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Seed
impl RefUnwindSafe for Seed
impl Send for Seed
impl Sync for Seed
impl Unpin for Seed
impl UnsafeUnpin for Seed
impl UnwindSafe for Seed
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more