pub trait ECKeyBase: Display + Debug + Clone + PartialEq + Eq + Hash {
    const KEY_SIZE: usize;

    // Required methods
    fn from_data_ref<T>(data: &T) -> Option<Self>
       where T: AsRef<[u8]>,
             Self: Sized;
    fn data(&self) -> &[u8] ;

    // Provided methods
    fn hex(&self) -> String { ... }
    fn from_hex(hex: &str) -> Option<Self> { ... }
}
Expand description

A type that represents an elliptic curve digital signature algorithm (ECDSA) key.

Required Associated Constants§

Required Methods§

source

fn from_data_ref<T>(data: &T) -> Option<Self>where T: AsRef<[u8]>, Self: Sized,

source

fn data(&self) -> &[u8]

Provided Methods§

source

fn hex(&self) -> String

source

fn from_hex(hex: &str) -> Option<Self>

Implementors§