Skip to main content

decrypt_ecdh_es

Function decrypt_ecdh_es 

Source
pub fn decrypt_ecdh_es(
    token: &str,
    local_private_key: &SecretKey,
) -> Result<Vec<u8>, WebexError>
Expand description

Decrypt a JWE compact serialization token encrypted with ECDH-ES (or ECDH-ES+A256KW).

The JWE header contains epk (the server’s ephemeral public key). We use our local private key + the server’s epk to derive the decryption key.