pub struct RecoveryCode { /* private fields */ }Expand description
一份恢复码。
持有 32 字节熵,析构时清零。不实现 Clone——与 SecretKey 同理,
复制要显式可见,便于审计。
Implementations§
Source§impl RecoveryCode
impl RecoveryCode
Sourcepub const fn from_entropy(entropy: [u8; 32]) -> Self
pub const fn from_entropy(entropy: [u8; 32]) -> Self
由已有熵构造(用于测试向量与跨实现验证)。
Sourcepub fn from_words(words: &[&str]) -> Result<Self, ParseError>
pub fn from_words(words: &[&str]) -> Result<Self, ParseError>
Sourcepub fn from_phrase(phrase: &str) -> Result<Self, ParseError>
pub fn from_phrase(phrase: &str) -> Result<Self, ParseError>
Trait Implementations§
Source§impl Debug for RecoveryCode
impl Debug for RecoveryCode
Source§impl Drop for RecoveryCode
impl Drop for RecoveryCode
Auto Trait Implementations§
impl Forget for RecoveryCode
impl Freeze for RecoveryCode
impl RefUnwindSafe for RecoveryCode
impl Send for RecoveryCode
impl Sync for RecoveryCode
impl Unpin for RecoveryCode
impl UnsafeUnpin for RecoveryCode
impl UnwindSafe for RecoveryCode
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