Function rusp::usp_generator::usp_no_session_context_record [−][src]
pub fn usp_no_session_context_record<'a>(
version: &'a str,
to_id: &'a str,
from_id: &'a str,
payload_security: PayloadSecurity,
mac_signature: &'a [u8],
sender_cert: &'a [u8],
msg: &'a [u8]
) -> Record<'a>
Wraps a Usp Msg into an “no_session_context” USP Record with the specified record information
Arguments
version
- The USP version of the recordto_id
- The USP Endpoint ID of the receiverfrom_id
- The USP Endpoint ID of the senderpayload_security
- An enumeration of typePayloadSecurity
mac_signature
- Message authentication code or signature used to ensure the integrity of the non-payload fields, when integrity protection of non-payload fields is performedsender_cert
- PEM encoded certificate used to provide the signature in themac_signature
field, when the payload security mechanism does not provide the mechanism to do somsg
- The ProtoBuf encoded USP Msg
Example
use rusp::usp_generator::usp_no_session_context_record; use rusp::usp_types::PayloadSecurity; let newrecord = usp_no_session_context_record( "1.1", "proto::myfancyrecipient", "proto::anonymous", PayloadSecurity::PLAINTEXT, &[], &[], &[], );