pub struct ChainCode(/* private fields */);Expand description
Chain code for key derivation in extended private and public keys. This is a 256-bit secret key that is completely independent of the private key and is used as an extension to the cryptographic domain, basically an extra state during iteration.
Implementations§
Source§impl ChainCode
impl ChainCode
Sourcepub fn to_bytes(&self) -> [u8; 32]
pub fn to_bytes(&self) -> [u8; 32]
The chain code serialized in a format that can be fed to from_bytes
Sourcepub fn from_bytes<D>(bytes: D) -> Result<ChainCode, Error>
pub fn from_bytes<D>(bytes: D) -> Result<ChainCode, Error>
Creates a chain code from a byte slice possibly returned by the to_bytes method.
§Error
If bytes is not CHAIN_CODE_SIZE long
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChainCode
impl RefUnwindSafe for ChainCode
impl Send for ChainCode
impl Sync for ChainCode
impl Unpin for ChainCode
impl UnwindSafe for ChainCode
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