]
]
{Build
Status]
{Coverage
Status]
]
]
Ruby Gem for RFC 3610 - Counter with CBC-MAC (CCM)
Add this line to your application's Gemfile:
gem 'openssl-ccm'
And then execute:
$ bundle
Or install it yourself as:
$ gem install openssl-ccm
Example:
require 'openssl/ccm' ccm = OpenSSL::CCM.new('AES', 'My16Byte LongKey', 8) ciphertext = ccm.encrypt('The message to encrypt', 'The nonce') plaintext = ccm.decrypt(ciphertext, 'The nonce')
After initialisation, you can use the object as often you need.