pub fn encrypt(keys: &SubscriptionKeys, payload: &[u8]) -> Result<Vec<u8>>Expand description
Encrypts payload for a subscription (aes128gcm content coding, RFC 8291), with a new key and salt.
§Errors
Error::BadRequest when the subscription’s keys are not valid
base64 P-256 keys, or the payload is over MAX_PAYLOAD.