pub fn encode_with_encrypter(
        &self,
        payload: &JwtPayload,
        header: &JweHeader,
        encrypter: &dyn JweEncrypter,
    ) -> Result<String, JoseError> {
        let payload_bytes = serde_json::to_vec(payload.claims_set()).unwrap();
        let jwt = self
            .jwe_context
            .serialize_compact(&payload_bytes, header, encrypter)?;
        Ok(jwt)
    }
/// Return the string repsentation of the JWT with the encrypting algorithm.
///
/// # Arguments
///
/// * `payload` - The payload data.
/// * `header` - The JWE heaser claims.
/// * `encrypter` - a encrypter object.
Return the string repsentation of the JWT with the encrypting algorithm.
Return the string repsentation of the JWT with the encrypting algorithm .
pub fn encode_with_encrypter(
        &self,
        payload: &JwtPayload,
        header: &JweHeader,
        encrypter: &dyn JweEncrypter,
    ) -> Result<String, JoseError> {
        let payload_bytes = serde_json::to_vec(payload.claims_set()).unwrap();
        let jwt = self
            .jwe_context
            .serialize_compact(&payload_bytes, header, encrypter)?;
        Ok(jwt)
    }
pub fn encode_with_encrypter ( & self , payload : & JwtPayload , header : & JweHeader , encrypter : & dyn JweEncrypter , ) -> Result < String , JoseError > { let payload_bytes = serde_json :: to_vec ( payload . claims_set ( ) ) . unwrap ( ) ; let jwt = self . jwe_context . serialize_compact ( & payload_bytes , header , encrypter ) ? ; Ok ( jwt ) }
Return the string repsentation of the JWT with the encrypting algorithm.
Return the string repsentation of the JWT with the encrypting algorithm .
&self
payload
&JwtPayload
header
&JweHeader
encrypter
&dyn JweEncrypter
&self
payload
&JwtPayload
header
&JweHeader
encrypter
&dyn JweEncrypter