Function josekit::jwe::serialize_general_json_with_selector [−][src]
pub fn serialize_general_json_with_selector<'a, F>(
payload: &[u8],
header: Option<&JweHeaderSet>,
recipient_headers: &[Option<&JweHeader>],
aad: Option<&[u8]>,
selector: F
) -> Result<String, JoseError> where
F: Fn(usize, &JweHeader) -> Option<&'a dyn JweEncrypter>,
Expand description
Return a representation of the data that is formatted by flattened json serialization.
Arguments
payload
- The payload data.header
- The JWS shared protected and unprotected header claims.recipient_headers
- The JWE unprotected header claims for recipients.aad
- The JWE additional authenticated data.selector
- a function for selecting the encrypting algorithm.