pub trait ToSecretBytes {
// Required methods
fn secret_bytes_length(&self) -> Result<usize, Error>;
fn write_secret_bytes(&self, out: &mut dyn WriteBuffer) -> Result<(), Error>;
// Provided method
fn to_secret_bytes(&self) -> Result<SecretBytes, Error> { ... }
}Expand description
Object-safe trait for exporting key secret bytes
Required Methods§
Sourcefn secret_bytes_length(&self) -> Result<usize, Error>
fn secret_bytes_length(&self) -> Result<usize, Error>
Get the length of a secret key
Sourcefn write_secret_bytes(&self, out: &mut dyn WriteBuffer) -> Result<(), Error>
fn write_secret_bytes(&self, out: &mut dyn WriteBuffer) -> Result<(), Error>
Write the key secret bytes to a buffer.
Provided Methods§
Sourcefn to_secret_bytes(&self) -> Result<SecretBytes, Error>
Available on crate feature alloc only.
fn to_secret_bytes(&self) -> Result<SecretBytes, Error>
alloc only.Write the key secret bytes to a new allocated buffer.
Implementors§
impl ToSecretBytes for AnyKey
Available on crate feature
any_key only.