Expand description
Public facade for ribergshamra XML security.
This crate re-exports the main ribergshamra subcrates and the most common
entry points for XML Signature and XML Encryption work. For signing and
verification, start with DsigContext, sign, verify, and
verify_all. For encryption and decryption, start with EncContext,
encrypt, decrypt, and decrypt_to_bytes.
Lower-level modules remain available when callers need direct access to
canonical XML (c14n), key loading and lookup (keys), transform handling
(transforms), or algorithm implementations (crypto).
Re-exports§
pub use ribergshamra_c14n as c14n;pub use ribergshamra_core as core;pub use ribergshamra_crypto as crypto;pub use ribergshamra_dsig as dsig;pub use ribergshamra_enc as enc;pub use ribergshamra_keys as keys;pub use ribergshamra_transforms as transforms;pub use ribergshamra_xml as xml;
Structs§
- Backend
Info - Compile-time provider metadata, capabilities, and explicit initialization. Attested information about the compile-time selected providers.
- Capability
- Compile-time provider metadata, capabilities, and explicit initialization. One advertised provider capability.
- Dsig
Context - Digital signature configuration and verification result types. Context for XML-DSig operations.
- EncContext
- Encryption configuration. Context for XML-Enc operations.
- Key
- Key types and the in-memory key manager. A named key with associated data.
- KeyData
- Key types and the in-memory key manager. Opaque, cloneable ribergshamra key data.
- Keys
Manager - Key types and the in-memory key manager. Manages a collection of keys for lookup during signature/encryption processing.
- Software
Key - Compile-time provider metadata, capabilities, and explicit initialization. Opaque, shared software-key handle.
- Verified
KeyInfo - Digital signature configuration and verification result types. Information about the key that was used to verify the signature.
- Verified
Reference - Digital signature configuration and verification result types.
Metadata about a single verified
<Reference>.
Enums§
- Backend
Id - Compile-time provider metadata, capabilities, and explicit initialization. Selected document-cryptography implementation.
- Error
- ribergshamra’s shared error type. Shared ribergshamra error type. Errors produced by the ribergshamra XML Security library.
- Fips
Status - Compile-time provider metadata, capabilities, and explicit initialization. Runtime FIPS state for the selected providers.
- KeyUsage
- Key types and the in-memory key manager. Usage flags for a key.
- Operation
- Compile-time provider metadata, capabilities, and explicit initialization. A provider operation, parameterized by the requested algorithm where useful.
- TlsBackend
Id - Compile-time provider metadata, capabilities, and explicit initialization. Selected TLS cryptography implementation.
- Verify
Result - Digital signature configuration and verification result types. Result of signature verification.
Functions§
- backend_
info - Compile-time provider metadata, capabilities, and explicit initialization. Inspect selected providers without triggering implicit initialization.
- capabilities
- Compile-time provider metadata, capabilities, and explicit initialization. Return the complete capability registry for the selected document provider.
- decrypt
- Decrypt XML Encryption content as UTF-8 text or raw bytes.
Decrypt an XML document containing
<EncryptedData>. - decrypt_
to_ bytes - Decrypt XML Encryption content as UTF-8 text or raw bytes.
Decrypt an XML document containing
<EncryptedData>. - encrypt
- Encrypt bytes into an XML Encryption template. Encrypt XML data using a template.
- initialize_
backend - Compile-time provider metadata, capabilities, and explicit initialization. Explicitly initialize and attest every selected provider.
- sign
- Sign an XML signature template. Sign an XML template document.
- supports
- Compile-time provider metadata, capabilities, and explicit initialization. Report whether the selected document provider supports an operation.
- verify
- Verify the first signature, or all signatures, in an XML document. Verify a signed XML document.
- verify_
all - Verify the first signature, or all signatures, in an XML document.
Verify every
<Signature>element in the document, returning oneVerifyResultper signature in document order.