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: String
Name to use for keyid
parameter
nonce: String
A random nonce to be provided for additional security
tag: String
Value 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.
Auto Trait Implementations§
impl Freeze for MessageSigner
impl RefUnwindSafe for MessageSigner
impl Send for MessageSigner
impl Sync for MessageSigner
impl Unpin for MessageSigner
impl UnwindSafe for MessageSigner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more