[][src]Trait solana_libra_nextgen_crypto::traits::ValidKeyStringExt

pub trait ValidKeyStringExt: ValidKey {
    fn from_encoded_string(
        encoded_str: &str
    ) -> Result<Self, CryptoMaterialError> { ... }
fn to_encoded_string(&self) -> Result<String> { ... } }

An extension to to/from Strings for ValidKey.

Relies on hex for string encoding / decoding. No required fields, provides a default implementation.

Provided methods

fn from_encoded_string(encoded_str: &str) -> Result<Self, CryptoMaterialError>

When trying to convert from bytes, we simply decode the string into bytes before checking if we can convert.

fn to_encoded_string(&self) -> Result<String>

A function to encode into hex-string after serializing.

Loading content...

Implementors

impl<T: ValidKey> ValidKeyStringExt for T[src]

Loading content...