pub struct Signer { /* private fields */ }Expand description
An Ed25519 signer. Construct from a 32-byte seed via
Signer::from_seed_bytes. Real-world callers should generate the
seed from an OS-level CSPRNG (getrandom, rand_core::OsRng, …).
Implementations§
Source§impl Signer
impl Signer
Sourcepub fn from_seed_bytes(seed: [u8; 32]) -> Self
pub fn from_seed_bytes(seed: [u8; 32]) -> Self
Build a signer from a 32-byte Ed25519 seed.
The seed is NOT hashed or stretched; pass a uniformly random value from a secure RNG. Deterministic seeds are fine for tests and smoke demos; use real entropy in production.
Sourcepub fn public_key_bytes(&self) -> [u8; 32]
pub fn public_key_bytes(&self) -> [u8; 32]
The 32-byte Ed25519 public key associated with this signer.
Auto Trait Implementations§
impl Freeze for Signer
impl RefUnwindSafe for Signer
impl Send for Signer
impl Sync for Signer
impl Unpin for Signer
impl UnsafeUnpin for Signer
impl UnwindSafe for Signer
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