[][src]Trait gu_ethkey::EthKey

pub trait EthKey {
    fn public(&self) -> &Public;
fn address(&self) -> Address;
fn sign(&self, msg: &Message) -> Result<Signature>;
fn verify(&self, sig: &Signature, msg: &Message) -> Result<bool>;
fn encrypt(&self, plain: &[u8]) -> Result<Vec<u8>>;
fn decrypt(&self, encrypted: &[u8]) -> Result<Vec<u8>>; }

Provides basic EC operations on curve Secp256k1.

Required Methods

get public key

get ethereum address

signs message with sef key

verifies signature for message and self key

ciphers given plain data

deciphers given encrypted data

Implementors

impl EthKey for SafeEthKey
[src]