XML-Security / signxml

Python XML Signature and XAdES library
https://xml-security.github.io/signxml/
Apache License 2.0
137 stars 108 forks source link

how to do signature to xml in python #185

Closed ailanbelal closed 2 years ago

ailanbelal commented 2 years ago

i have an xml doc i want to do signature and verify if the signature is correctly applied: her xml code: <Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2">

reporting:1.0 935 3cf5ee18-ee25-44ea-a444-2c37ba7f28be 2021-01-05 09:32:40 388 SAR SAR ”Invoice Number: 354; Invoice Issue Date: 2021-02-10” ICV 70 PIH NWZlY2ViNjZmZmM4NmYzOGQ5NTI3ODZjNmQ2OTZjNzljMmRiYzIzOWRkNGU5MWI0NjcyOWQ3M2EyN2ZiNTdlOQ== QR AQpGaXJzdCBTaG9wAg8zMTAxODkzNzU5MjAwMDMDFDIwMjEtMDEtMDVUMDk6MzI6NDBaBAYyNTAuMDAFBDAuMDAGQDhiMGE1Zjk5YWQ2MjEzZjVmZGJhM2YyZGI4Zjk4OWZiOTkyYzBhYjQ4NmEyOTIyYjIyMWIxNWJjODYzODlkNWEHsDMwNTYzMDEwMDYwNzJhODY0OGNlM2QwMjAxMDYwNTJiODEwNDAwMGEwMzQyMDAwNDk2ZThjNDk0MDNmYzA5NDVjOGY0MDI1OGNkZDJkOWU5MzAxYTc5MjEyYTkzYTdjOGZmYWQ4ZWMyZDgxNWMyNWYyY2I0ZGQ1ZmU1M2ZiOGU3ZDBiNGEwMjZmY2E0NTcyMzUxM2Q3N2MwZTMzOGU5MTUxNjhlNTBkNTk0MDRkYjk0CCBnn5Fhp6qCOBB+MMZTOU3/U3wGIVpnvGnJURw/1cYJ2gkgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= urn:oasis:names:specification:ubl:signature:Invoice urn:oasis:names:specification:ubl:dsig:enveloped:xades 1265126534 Kemarat Street, 3724 9833 ِAlfalah Jeddah 15385 Makkah SA 310189375920003 VAT First Shop 3102197112 Kemarat Street, 3724 9833 ِAlfalah Jeddah 15385 Makkah SA Sara Hamad 2022-02-10 42 “Returned items” 0.00 0.00 0.00 Z 0 VATEX-SA-HEA Private healthcare to citizen VAT 0.00 250.00 250.00 250.00 250.00 18373428 1 250.00 0.00 250.00 Surgery Z 0 VAT 250.00
kislyuk commented 2 years ago

Thanks for your interest in SignXML. If you need help, please make sure you understand and follow the package documentation, then show your work. Closing since this is not an issue with the library.