Sha256: 96881ea378e73f9329299f53efdbfa07e929a89f80b1f0532f6ae1af96eee91f

Contents?: true

Size: 1.2 KB

Versions: 6

Compression:

Stored size: 1.2 KB

Contents

# Xmlenc

This gem is a (partial) implementation of the XMLEncryption specification (http://www.w3.org/TR/xmlenc-core/)

## Installation

Add this line to your application's Gemfile:

    gem 'xmlenc'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install xmlenc

## Usage

### Decrypt a document

```ruby
key_pem = File.read('path/to/key.pem')
xml = File.read('path/to/file.xml')

private_key = OpenSSL::PKey::RSA.new(key_pem)
encrypted_document = Xmlenc::EncryptedDocument.new(xml)
decrypted_document = encrypted_document.decrypt(private_key)
```

### Supported algorithms

Data algorithms
* http://www.w3.org/2001/04/xmlenc#tripledes-cbc
* http://www.w3.org/2001/04/xmlenc#aes128-cbc
* http://www.w3.org/2001/04/xmlenc#aes256-cbc

Key algorithms

* http://www.w3.org/2001/04/xmlenc#rsa-1_5
* http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p (Without OAEPParams and only SHA1 digest methods)


## Roadmap
1. add encryption (in progress)
2. support more algorithms

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
xmlenc-0.4.0 README.md
xmlenc-0.3.0 README.md
xmlenc-0.2.1 README.md
xmlenc-0.2.0 README.md
xmlenc-0.1.7 README.md
xmlenc-0.1.6 README.md