pub struct Ed25519Keypair { /* private fields */ }Implementations§
Source§impl Ed25519Keypair
impl Ed25519Keypair
pub fn generate() -> Self
pub fn from_seed(seed: [u8; 32]) -> Self
pub fn public_key(&self) -> [u8; 32]
pub fn sign(&self, msg: &[u8]) -> [u8; 64]
pub fn verify( pubkey: &[u8; 32], msg: &[u8], sig: &[u8; 64], ) -> Result<(), &'static str>
pub fn to_bytes(&self) -> Zeroizing<[u8; 32]>
Auto Trait Implementations§
impl Freeze for Ed25519Keypair
impl RefUnwindSafe for Ed25519Keypair
impl Send for Ed25519Keypair
impl Sync for Ed25519Keypair
impl Unpin for Ed25519Keypair
impl UnsafeUnpin for Ed25519Keypair
impl UnwindSafe for Ed25519Keypair
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