pub struct SignContext<'a> { /* private fields */ }Expand description
XMLDSig signing context.
Implementations§
Source§impl<'a> SignContext<'a>
impl<'a> SignContext<'a>
Sourcepub fn new(signing_key: &'a dyn SigningKey) -> Self
pub fn new(signing_key: &'a dyn SigningKey) -> Self
Create a signing context using the supplied private key.
Sourcepub fn sign_template(&self, xml: &str) -> Result<String, SigningError>
pub fn sign_template(&self, xml: &str) -> Result<String, SigningError>
Sign XML that already contains a <Signature> template.
The template must include empty <DigestValue> and <SignatureValue>
targets. The pipeline fills reference digests, reparses the result,
canonicalizes <SignedInfo>, signs those canonical bytes, and fills the
base64 <SignatureValue>.
Sourcepub fn sign_with_builder(
&self,
xml: &str,
builder: &SignatureBuilder,
) -> Result<String, SigningError>
pub fn sign_with_builder( &self, xml: &str, builder: &SignatureBuilder, ) -> Result<String, SigningError>
Build a signature template, append it to the source root, then sign it.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SignContext<'a>
impl<'a> !Send for SignContext<'a>
impl<'a> !Sync for SignContext<'a>
impl<'a> !UnwindSafe for SignContext<'a>
impl<'a> Freeze for SignContext<'a>
impl<'a> Unpin for SignContext<'a>
impl<'a> UnsafeUnpin for SignContext<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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