Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A Python interface to SC14N

Project description

The utility Sc14n performs the C14N transformation of a straightforward XML document.

>>> # Example 1. Excludes the first element with the tag name <Signature>
>>> r = C14n.file2file("c14nfile1.txt", "input.xml", "Signature", Tran.EXCLUDEBYTAG)
>>> # Example 2. Finds and transforms the first element with the tag name <SignedInfo>
>>> r = C14n.file2file("c14nfile2.txt", "input.xml", "SignedInfo", Tran.SUBSETBYTAG)
>>> # Example 3. Finds and transforms the third element with the tag name <Data>
>>> r = C14n.file2file("c14nfile3.txt", "input.xml", "Data[3]", Tran.SUBSETBYTAG)
>>> # Example 4. Finds and transforms the element with attribute Id="foo"
>>> r = C14n.file2file("c14nfile4.txt", "input.xml", "foo", Tran.SUBSETBYID)
>>> # Example 5. Finds and transforms the element with attribute ID="bar"
>>> r = C14n.file2file("c14nfile5.txt", "input.xml", "ID=bar", Tran.SUBSETBYID)
>>> # Example 6. Excludes element with attribute Id="thesig"
>>> r = C14n.file2file("c14nfile6.txt", "input.xml", "thesig", Tran.EXCLUDEBYID)

For full details of all available methods and options, please see the documentation.

Sc14n can be used with a cryptographic library to sign XML documents using XML-DSIG. We use our cryptographic library CryptoSys PKI available from

System requirements

Windows platforms with Python 2 only (at least 2.6). Python 3 is not supported. Requires the Windows program Sc14n to be installed on your system.

To carry out the cryptographic signing examples in you must also install CryptoSys PKI.


For more information or to make suggestions, please contact us at

David Ireland
DI Management Services Pty Ltd
10 December 2018

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sc14npy, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size (71.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page