pub struct ECIES {}
Expand description
Electrum compatible ECIES implementation. Comparable to Ecies.electrumEncrypt in BSV.JS
Implementations§
Source§impl ECIES
impl ECIES
pub fn encrypt( message: &[u8], sender_priv_key: &PrivateKey, recipient_pub_key: &PublicKey, exclude_pub_key: bool, ) -> Result<ECIESCiphertext, BSVErrors>
Sourcepub 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§
Auto Trait Implementations§
impl Freeze for ECIES
impl RefUnwindSafe for ECIES
impl Send for ECIES
impl Sync for ECIES
impl Unpin for ECIES
impl UnwindSafe for ECIES
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more