logo
pub trait AsymmetricType<'a> where
    Self: 'a + Sized + Tagged<u8>,
    Vec<u8>: From<&'a Self>, 
{ fn system() -> Self; fn ed25519_from_bytes<T: AsRef<[u8]>>(bytes: T) -> Result<Self, Error>; fn secp256k1_from_bytes<T: AsRef<[u8]>>(bytes: T) -> Result<Self, Error>; fn to_hex(&'a self) -> String { ... } fn from_hex<A: AsRef<[u8]>>(input: A) -> Result<Self, Error> { ... } }
Expand description

Operations on asymmetric cryptographic type.

Required methods

Constructs a new system variant.

Constructs a new ed25519 variant from a byte slice.

Constructs a new secp256k1 variant from a byte slice.

Provided methods

Converts self to hex, where the first byte represents the algorithm tag.

Tries to decode Self from its hex-representation. The hex format should be as produced by AsymmetricType::to_hex().

Implementors