This is an eXist-db implementation of the EXPath HTTP Crypto Module specification.
Requires:
- Java 1.8 or newer
- Maven 3.6 or newer
$ git clone https://github.com/eXist-db/expath-crypto-module.git
$ cd expath-crypto-module
$ mvn clean package
This will create a "expath-crypto-module-.xar" file in the target folder. The .xar file can be uploaded to any eXist-db version > 5.3.0 via the Dashboard.
- crypto:hash()
- crypto:hmac() (only for xs:string data for now)
- crypto:encrypt() (only for xs:string data and symmetric encryption for now)
- crypto:decrypt() (only for xs:string data and symmetric decryption for now)
- crypto:generate-signature() (only for XML data for now)
- crypto:validate-signature() (only for XML data for now)
- For crypto:hash(): "MD5", "SHA-1", "SHA-256", "SHA-384", "SHA-512".
- For crypto:hmac(): "HMAC-MD5", "HMAC-SHA-1", "HMAC-SHA-256", "HMAC-SHA-384", "HMAC-SHA-512".
For the latest version of the specification for this module see http://expath.org/spec/crypto/editor.
The implementation follows this specification.
Unit Tests use XQSuite and can be found in the src/test/xquery/crypto folder.
To run tests:
$ mvn verify