Trait askar_crypto::repr::ToPublicBytes
source · pub trait ToPublicBytes {
// Required methods
fn public_bytes_length(&self) -> Result<usize, Error>;
fn write_public_bytes(&self, out: &mut dyn WriteBuffer) -> Result<(), Error>;
// Provided method
fn to_public_bytes(&self) -> Result<SecretBytes, Error> { ... }
}
Expand description
Object-safe trait for exporting key public bytes
Required Methods§
sourcefn public_bytes_length(&self) -> Result<usize, Error>
fn public_bytes_length(&self) -> Result<usize, Error>
Get the length of a public key
sourcefn write_public_bytes(&self, out: &mut dyn WriteBuffer) -> Result<(), Error>
fn write_public_bytes(&self, out: &mut dyn WriteBuffer) -> Result<(), Error>
Write the key public bytes to a buffer.
Provided Methods§
sourcefn to_public_bytes(&self) -> Result<SecretBytes, Error>
fn to_public_bytes(&self) -> Result<SecretBytes, Error>
Available on crate feature
alloc
only.Write the key public bytes to a new allocated buffer.