Trait casper_types::crypto::AsymmetricType[][src]

pub trait AsymmetricType: Sized + AsRef<[u8]> + Tagged<u8> {
    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(&self) -> String { ... }
fn from_hex<A: AsRef<[u8]>>(input: A) -> Result<Self, Error> { ... } }

Operations on asymmetric cryptographic type

Required methods

fn system() -> Self[src]

Constructs a new system variant.

fn ed25519_from_bytes<T: AsRef<[u8]>>(bytes: T) -> Result<Self, Error>[src]

Constructs a new ed25519 variant from a byte slice.

fn secp256k1_from_bytes<T: AsRef<[u8]>>(bytes: T) -> Result<Self, Error>[src]

Constructs a new secp256k1 variant from a byte slice.

Loading content...

Provided methods

fn to_hex(&self) -> String[src]

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

fn from_hex<A: AsRef<[u8]>>(input: A) -> Result<Self, Error>[src]

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

Loading content...

Implementors

impl AsymmetricType for PublicKey[src]

impl AsymmetricType for SecretKey[src]

impl AsymmetricType for Signature[src]

Loading content...