pub struct SignRequest<T> {Show 13 fields
pub signing_key: T,
pub algorithm: SigningAlgorithm,
pub canonicalization: Canonicalization,
pub domain: DomainName,
pub header_selection: HeaderSelection,
pub identity: Option<Identity>,
pub body_length: BodyLength,
pub selector: Selector,
pub timestamp: Timestamp,
pub expiration: Expiration,
pub copy_headers: bool,
pub ext_tags: Vec<(String, String)>,
pub format: OutputFormat,
}Expand description
A request for creation of a DKIM signature.
Fields§
§signing_key: TThe key to use for producing the cryptographic signature.
algorithm: SigningAlgorithmThe signing algorithm to use in the a= tag. Must be compatible with the signing key.
canonicalization: CanonicalizationThe canonicalization to use in the c= tag.
domain: DomainNameThe signing domain to use in the d= tag.
header_selection: HeaderSelectionThe selection of headers to include in the h= tag.
identity: Option<Identity>The agent or user identifier to use in the i= tag.
body_length: BodyLengthThe length of the message body in the l= tag.
selector: SelectorThe selector to use in the s= tag.
timestamp: TimestampThe timestamp value to record in the t= tag.
expiration: ExpirationThe expiration timestamp to specify in the x= tag.
copy_headers: boolWhether to record all headers used to create the signature in the z= tag.
Additional tag/value pairs to include in the signature.
format: OutputFormatThe formatting options to use for producing the formatted DKIM-Signature header.
Implementations§
Source§impl<T> SignRequest<T>
impl<T> SignRequest<T>
Sourcepub fn new(
domain: DomainName,
selector: Selector,
algorithm: SigningAlgorithm,
signing_key: T,
) -> Self
pub fn new( domain: DomainName, selector: Selector, algorithm: SigningAlgorithm, signing_key: T, ) -> Self
Creates a request for signing using practical default values.
The default settings used are not necessarily the Default values of
each type, but values that are sensible in practice: c= is
relaxed/simple, x= is five days.