Skip to main content

encrypt_shielded_address

Function encrypt_shielded_address 

Source
pub fn encrypt_shielded_address(
    shared_key: &[u8; 32],
    iv: &[u8; 16],
    address: &[u8; 43],
) -> [u8; 64]
Expand description

Encrypt a shielded payment address as a contact request’s encryptedShieldedAddress: the IV, then the address under AES-256-CBC with the request’s DIP-15 shared key, the key that encrypts its encryptedPublicKey.

iv is drawn at random for this field alone: no two fields of a request share one.