pub struct MessageSigner {
pub keyid: String,
pub nonce: String,
pub tag: String,
}Expand description
A struct that implements signing. The struct fields here are serialized into the Signature-Input
header.
Fields§
§keyid: StringName to use for keyid parameter
nonce: StringA random nonce to be provided for additional security
tag: StringValue to be used for tag parameter
Implementations§
Source§impl MessageSigner
impl MessageSigner
Sourcepub fn generate_signature_headers_content(
&self,
message: &mut impl UnsignedMessage,
expires: Duration,
algorithm: Algorithm,
signing_key: &Vec<u8>,
) -> Result<(), ImplementationError>
pub fn generate_signature_headers_content( &self, message: &mut impl UnsignedMessage, expires: Duration, algorithm: Algorithm, signing_key: &Vec<u8>, ) -> Result<(), ImplementationError>
Sign the provided method with signing_key, setting an expiration value of
length expires from now (the time of signing).
§Errors
Returns ImplementationErrors relevant to signing and parsing.
Returns an error if the algorithm chosen is not supported by this library.