pub struct SecretKey(/* private fields */);
Expand description
An WOTS secret key.
Implementations§
Source§impl SecretKey
impl SecretKey
Sourcepub fn sign(&self, message: &[u8]) -> Signature
pub fn sign(&self, message: &[u8]) -> Signature
WOTS algorithm.
§Inputs
message
in bytes representation.
§Returns
An WOTS Signature
on the message
.
§Example
use rand::rngs::OsRng;
use wots_rs::SecretKey;
let mut csprng = OsRng{};
let secret_key: SecretKey = SecretKey::generate(&mut csprng);
let message = b"hello";
let signature = secret_key.sign(message);
Trait Implementations§
impl Eq for SecretKey
impl StructuralPartialEq for SecretKey
Auto Trait Implementations§
impl Freeze for SecretKey
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnwindSafe for SecretKey
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