pub struct ScanSecretKey(/* private fields */);Expand description
The receiver’s scan secret key (b_scan 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 ScanSecretKey
impl ScanSecretKey
Sourcepub fn from_slice(data: &[u8]) -> Result<ScanSecretKey, CryptoError>
pub fn from_slice(data: &[u8]) -> Result<ScanSecretKey, 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) -> ScanSecretKey
pub fn from_secret_key(sk: SecretKey) -> ScanSecretKey
Create from an existing SecretKey.
Sourcepub fn public_key(&self, secp: &Secp256k1<All>) -> ScanPublicKey
pub fn public_key(&self, secp: &Secp256k1<All>) -> ScanPublicKey
Derive the corresponding ScanPublicKey.
Trait Implementations§
Source§impl Debug for ScanSecretKey
impl Debug for ScanSecretKey
Source§impl Drop for ScanSecretKey
impl Drop for ScanSecretKey
Source§impl PartialEq for ScanSecretKey
impl PartialEq for ScanSecretKey
impl Eq for ScanSecretKey
Auto Trait Implementations§
impl Freeze for ScanSecretKey
impl RefUnwindSafe for ScanSecretKey
impl Send for ScanSecretKey
impl Sync for ScanSecretKey
impl Unpin for ScanSecretKey
impl UnsafeUnpin for ScanSecretKey
impl UnwindSafe for ScanSecretKey
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