pub struct SpendSecretKey(/* private fields */);Expand description
The receiver’s spend secret key (b_spend in BIP 352).
Zeroized on drop via non_secure_erase() (SEC-01).
Does NOT derive Copy, Clone, or Debug (SEC-02 timing protection).
Implementations§
Source§impl SpendSecretKey
impl SpendSecretKey
Sourcepub fn from_slice(data: &[u8]) -> Result<SpendSecretKey, CryptoError>
pub fn from_slice(data: &[u8]) -> Result<SpendSecretKey, CryptoError>
Create from a 32-byte slice.
Returns CryptoError::InvalidSecretKey if the bytes are all zeros
or represent a value >= the curve order.
Sourcepub fn from_secret_key(sk: SecretKey) -> SpendSecretKey
pub fn from_secret_key(sk: SecretKey) -> SpendSecretKey
Create from an existing SecretKey.
Sourcepub fn public_key(&self, secp: &Secp256k1<All>) -> SpendPublicKey
pub fn public_key(&self, secp: &Secp256k1<All>) -> SpendPublicKey
Derive the corresponding SpendPublicKey.
Trait Implementations§
Source§impl Debug for SpendSecretKey
impl Debug for SpendSecretKey
Source§impl Drop for SpendSecretKey
impl Drop for SpendSecretKey
Source§impl PartialEq for SpendSecretKey
impl PartialEq for SpendSecretKey
impl Eq for SpendSecretKey
Auto Trait Implementations§
impl Freeze for SpendSecretKey
impl RefUnwindSafe for SpendSecretKey
impl Send for SpendSecretKey
impl Sync for SpendSecretKey
impl Unpin for SpendSecretKey
impl UnsafeUnpin for SpendSecretKey
impl UnwindSafe for SpendSecretKey
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