Struct bsv_wasm::ecies::ECIES [−][src]
pub struct ECIES {}Expand description
Electrum compatible ECIES implementation. Comparable to Ecies.electrumEncrypt in BSV.JS
Implementations
pub fn encrypt(
message: &[u8],
sender_priv_key: &PrivateKey,
recipient_pub_key: &PublicKey,
exclude_pub_key: bool
) -> Result<ECIESCiphertext, BSVErrors>
pub fn encrypt_with_ephemeral_private_key(
message: &[u8],
recipient_pub_key: &PublicKey
) -> Result<ECIESCiphertext, BSVErrors>
pub fn encrypt_with_ephemeral_private_key(
message: &[u8],
recipient_pub_key: &PublicKey
) -> Result<ECIESCiphertext, BSVErrors>
Encrypt with a randomly generate private key. This is intended to be used if you want to anonymously send a party an encrypted message.
pub fn decrypt(
ciphertext: &ECIESCiphertext,
recipient_priv_key: &PrivateKey,
sender_pub_key: &PublicKey
) -> Result<Vec<u8>, BSVErrors>
pub fn derive_cipher_keys(
priv_key: &PrivateKey,
pub_key: &PublicKey
) -> Result<CipherKeys, BSVErrors>
Trait Implementations
The type that holds the reference to Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read more
Recover a Self::Anchor from Self::Abi. Read more
Auto Trait Implementations
impl RefUnwindSafe for ECIES
impl UnwindSafe for ECIES
Blanket Implementations
Mutably borrows from an owned value. Read more
type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
Same as IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err. Read more