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