#[repr(C)]pub struct SecretKey { /* private fields */ }
Expand description
secret key type
Implementations§
Source§impl SecretKey
impl SecretKey
Sourcepub fn deserialize(&mut self, buf: &[u8]) -> bool
pub fn deserialize(&mut self, buf: &[u8]) -> bool
return true if buf
is deserialized successfully
buf
- serialized data byserialize
Source§impl SecretKey
impl SecretKey
Sourcepub fn set_by_csprng(&mut self)
pub fn set_by_csprng(&mut self)
init secret key by CSPRNG
Sourcepub fn set_hex_str(&mut self, s: &str) -> bool
pub fn set_hex_str(&mut self, s: &str) -> bool
set hexadecimal string s
to self
Sourcepub fn from_hex_str(s: &str) -> Result<SecretKey, BlsError>
pub fn from_hex_str(s: &str) -> Result<SecretKey, BlsError>
return the secret key set by hexadecimal string s
Sourcepub fn get_publickey(&self) -> PublicKey
pub fn get_publickey(&self) -> PublicKey
return the public key corresponding to self
Trait Implementations§
impl Copy for SecretKey
impl Eq 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