Trait askar_crypto::repr::ToSecretBytes [−][src]
pub trait ToSecretBytes { fn secret_bytes_length(&self) -> Result<usize, Error>; fn write_secret_bytes(&self, out: &mut dyn WriteBuffer) -> Result<(), Error>; fn to_secret_bytes(&self) -> Result<SecretBytes, Error> { ... } }
Expand description
Object-safe trait for exporting key secret bytes
Required methods
fn secret_bytes_length(&self) -> Result<usize, Error>
[src]
Expand description
Get the length of a secret key
fn write_secret_bytes(&self, out: &mut dyn WriteBuffer) -> Result<(), Error>
[src]
Expand description
Write the key secret bytes to a buffer.
Provided methods
fn to_secret_bytes(&self) -> Result<SecretBytes, Error>
[src]
This is supported on crate feature
alloc
only.Expand description
Write the key secret bytes to a new allocated buffer.
Implementors
impl ToSecretBytes for AnyKey
[src]
impl ToSecretBytes for AnyKey
[src]fn secret_bytes_length(&self) -> Result<usize, Error>
[src]
fn write_secret_bytes(&self, out: &mut dyn WriteBuffer) -> Result<(), Error>
[src]
impl<K> ToSecretBytes for K where
K: KeySecretBytes,
[src]
impl<K> ToSecretBytes for K where
K: KeySecretBytes,
[src]