pub struct SecretKey { /* private fields */ }Implementations§
Source§impl SecretKey
impl SecretKey
pub fn generate() -> Result<Self, P256Error>
pub fn from_hex(hex: &str) -> Result<Self, P256Error>
pub fn from_bytes(bytes: [u8; 32]) -> Result<Self, P256Error>
pub fn to_hex(&self) -> String
pub fn to_bytes(&self) -> [u8; 32]
pub fn public_key(&self) -> Result<PublicKey, P256Error>
pub fn sign_ecdsa_prehash( &self, digest32: [u8; 32], ) -> Result<EcdsaSignature, P256Error>
Trait Implementations§
impl Copy for SecretKey
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 UnsafeUnpin 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