pub struct Key { /* private fields */ }Implementations
sourceimpl Key
impl Key
pub fn generate() -> Key
pub fn from_secret_key_bytes(secret_key_bytes: &[u8; 32]) -> Key
pub fn public_key_bytes(&self) -> PublicKeyBytes
pub fn secret_key_bytes(&self) -> SecretKeyBytes
pub fn public(&self) -> String
pub fn secret(&self) -> String
pub fn sign(&self, msg: &[u8]) -> [u8; 64]
pub fn verify(
public_key_bytes: &PublicKeyBytes,
message: &[u8],
signature_bytes: &SignatureBytes
) -> Result<(), Box<dyn Error>>
pub fn subkey(&self, n: usize) -> Key
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more