openssl-ccm 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 99cd161672c23d850707385c401f21e8112d43b5
4
- data.tar.gz: 44d0f782586d03cd9849037ba82d07edcca004f6
3
+ metadata.gz: 92a532b59b054ccfe21e829d38c498d8ba7bfd89
4
+ data.tar.gz: 3dce973fb8819b77169e896a3aaeb73854d0f074
5
5
  SHA512:
6
- metadata.gz: f8bd10043a84337f7f0ab4d90fc83a5deea1874195218f02902b1a2a9f80f2f1baa076ef0c35580c22a20f7ffc94ce5d4e836bc1ecf304280a60f3725d57d797
7
- data.tar.gz: 088919b7f4ccf982ec30074ac1bcec285d8c0aef3349bc744b6eb3dca7fd5d79213b1dda961f77ce59edb5b54b85aee4050d04504431683a8d3db946d41d0877
6
+ metadata.gz: 65a1cb1f4da10606b442551fbec24981c508ce7466b203e931d692e4bfc90e474e15d3e99a24ca0f805efa122d9ccc2ec477b108fa05ceaade01305202d3f198
7
+ data.tar.gz: a05d1e9b346e0ed7487d3972da57257b91741de4ab8f453f09cd2c0c51099e62c4118933f9689a53ba5dc97a2ac2acf6f9c55f84f71067563892f481d111be2c
data/README.md CHANGED
@@ -1,4 +1,33 @@
1
- openssl-ccm
2
- ===========
1
+ # openssl-ccm
3
2
 
4
3
  Ruby Gem for RFC 3610 - Counter with CBC-MAC (CCM)
4
+
5
+ Abstract from tools.ietf.org/html/rfc3610: Counter with CBC-MAC (CCM) is a generic authenticated encryption block cipher mode. CCM is defined for use with 128-bit block ciphers, such as the Advanced Encryption Standard (AES).
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'openssl-ccm'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install openssl-ccm
20
+
21
+ ## Usage
22
+
23
+ Example:
24
+
25
+ require 'openssl/ccm'
26
+
27
+ ccm = OpenSSL::CCM.new('AES', 'My16Byte LongKey', 8)
28
+
29
+ ciphertext = ccm.encrypt('The message to encrypt', 'The nonce')
30
+
31
+ plaintext = ccm.decrypt(ciphertext, 'The nonce')
32
+
33
+ After initialisation, you can use the object as often you need.
@@ -12,14 +12,14 @@ module OpenSSL
12
12
  # ciphers, such as the Advanced Encryption Standard (AES).
13
13
  #
14
14
  # At the moment there is no update function, because length of
15
- # data and additional_data are needed to start of cipher process.
15
+ # data and additional_data are needed at the begin of cipher process.
16
16
  # In future init(nonce, data_len, additional_data_len) could
17
17
  # be a solution, to solve this problem. After init, update(data)
18
18
  # could be used to set additional_data first followed by data.
19
19
  class CCM
20
20
  # Searches for supported algorithms within OpenSSL
21
21
  #
22
- # @return [Stringlist] of supported algorithms
22
+ # @return [[String]] supported algorithms
23
23
  def self.ciphers
24
24
  l = OpenSSL::Cipher.ciphers.keep_if { |c| c.end_with?('-128-CBC') }
25
25
  l.length.times { |i| l[i] = l[i][0..-9] }
@@ -1,6 +1,5 @@
1
1
  module OpenSSL
2
- # CCM Version
3
2
  class CCM
4
- VERSION = '1.0.0'
3
+ VERSION = '1.1.0'
5
4
  end
6
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openssl-ccm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Schmertmann