aes 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
 - data/Gemfile +1 -0
 - data/VERSION +1 -1
 - data/aes.gemspec +2 -2
 - data/lib/aes/aes.rb +2 -2
 - metadata +61 -61
 
    
        checksums.yaml
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA256:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: ef1f680f9605df798ed802062996a3112fb027b60d578ae3c14a7961526f187c
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: ee8cd2bbb7bcee075fc7190f22ba2ac369164f8c813c9f75c4d6a73d11167963
         
     | 
| 
      
 5 
     | 
    
         
            +
            SHA512:
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 59a5c0aacf6acff3407cd060a7cebf65e755a20fade01b6f7b26d8b5ac7c446fa376f3993f9b6d439cd4026306d9a89d1f2dab4318c36782c72d52cac9939bcc
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: dc41097513f47e19c9e3b1f9c99d471b628bec29b0aac817b21d43e83f7d9e5f78aadf85a01b14e72d4a4aad5dff5d15058a2706b9332cb0d4b32e60cb392430
         
     | 
    
        data/Gemfile
    CHANGED
    
    
    
        data/VERSION
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            0.5. 
     | 
| 
      
 1 
     | 
    
         
            +
            0.5.1
         
     | 
    
        data/aes.gemspec
    CHANGED
    
    | 
         @@ -5,11 +5,11 @@ 
     | 
|
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       7 
7 
     | 
    
         
             
              s.name = "aes"
         
     | 
| 
       8 
     | 
    
         
            -
              s.version = "0.5. 
     | 
| 
      
 8 
     | 
    
         
            +
              s.version = "0.5.1"
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         
     | 
| 
       11 
11 
     | 
    
         
             
              s.authors = ["Carl Hicks"]
         
     | 
| 
       12 
     | 
    
         
            -
              s.date = " 
     | 
| 
      
 12 
     | 
    
         
            +
              s.date = "2020-09-30"
         
     | 
| 
       13 
13 
     | 
    
         
             
              s.description = "An AES encrypt/decrypt gem built ontop of OpenSSL.  Not as quick as FastAES, but it doesn't require building\n    native extensions and supports Base64 encoded input and output."
         
     | 
| 
       14 
14 
     | 
    
         
             
              s.email = "carl.hicks@gmail.com"
         
     | 
| 
       15 
15 
     | 
    
         
             
              s.extra_rdoc_files = [
         
     | 
    
        data/lib/aes/aes.rb
    CHANGED
    
    | 
         @@ -11,7 +11,7 @@ module AES 
     | 
|
| 
       11 
11 
     | 
    
         
             
                # Generates a random key of the specified length in bits
         
     | 
| 
       12 
12 
     | 
    
         
             
                # Default format is :plain
         
     | 
| 
       13 
13 
     | 
    
         
             
                def key(length=256,format=:plain)
         
     | 
| 
       14 
     | 
    
         
            -
                  key = ::AES::AES.new("").random_key( 
     | 
| 
      
 14 
     | 
    
         
            +
                  key = ::AES::AES.new("").random_key(length)
         
     | 
| 
       15 
15 
     | 
    
         
             
                  case format
         
     | 
| 
       16 
16 
     | 
    
         
             
                  when :base_64
         
     | 
| 
       17 
17 
     | 
    
         
             
                    Base64.encode64(key).chomp
         
     | 
| 
         @@ -148,7 +148,7 @@ module AES 
     | 
|
| 
       148 
148 
     | 
    
         | 
| 
       149 
149 
     | 
    
         
             
                  # Create a new cipher using the cipher type specified
         
     | 
| 
       150 
150 
     | 
    
         
             
                  def _setup(action)
         
     | 
| 
       151 
     | 
    
         
            -
                    @cipher ||= OpenSSL::Cipher 
     | 
| 
      
 151 
     | 
    
         
            +
                    @cipher ||= OpenSSL::Cipher.new(@options[:cipher]) 
         
     | 
| 
       152 
152 
     | 
    
         
             
                    # Toggles encryption mode
         
     | 
| 
       153 
153 
     | 
    
         
             
                    @cipher.send(action)
         
     | 
| 
       154 
154 
     | 
    
         
             
                    @cipher.padding = @options[:padding]
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,74 +1,82 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            --- !ruby/object:Gem::Specification 
     | 
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: aes
         
     | 
| 
       3 
     | 
    
         
            -
            version: !ruby/object:Gem::Version 
     | 
| 
       4 
     | 
    
         
            -
               
     | 
| 
       5 
     | 
    
         
            -
              version: 0.5.0
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.5.1
         
     | 
| 
       6 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
     | 
    
         
            -
            authors: 
     | 
| 
      
 6 
     | 
    
         
            +
            authors:
         
     | 
| 
       8 
7 
     | 
    
         
             
            - Carl Hicks
         
     | 
| 
       9 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2020-09-30 00:00:00.000000000 Z
         
     | 
| 
      
 12 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 13 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
       16 
14 
     | 
    
         
             
              name: shoulda
         
     | 
| 
       17 
     | 
    
         
            -
              requirement:  
     | 
| 
       18 
     | 
    
         
            -
                 
     | 
| 
       19 
     | 
    
         
            -
                requirements: 
         
     | 
| 
      
 15 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 16 
     | 
    
         
            +
                requirements:
         
     | 
| 
       20 
17 
     | 
    
         
             
                - - ">="
         
     | 
| 
       21 
     | 
    
         
            -
                  - !ruby/object:Gem::Version 
     | 
| 
       22 
     | 
    
         
            -
                    version:  
     | 
| 
      
 18 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       23 
20 
     | 
    
         
             
              type: :development
         
     | 
| 
       24 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       25 
     | 
    
         
            -
              version_requirements:  
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
      
 22 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 23 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 24 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 25 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 27 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
       27 
28 
     | 
    
         
             
              name: bundler
         
     | 
| 
       28 
     | 
    
         
            -
              requirement:  
     | 
| 
       29 
     | 
    
         
            -
                 
     | 
| 
       30 
     | 
    
         
            -
                requirements: 
         
     | 
| 
      
 29 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 30 
     | 
    
         
            +
                requirements:
         
     | 
| 
       31 
31 
     | 
    
         
             
                - - ">="
         
     | 
| 
       32 
     | 
    
         
            -
                  - !ruby/object:Gem::Version 
     | 
| 
       33 
     | 
    
         
            -
                    version:  
     | 
| 
      
 32 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 33 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       34 
34 
     | 
    
         
             
              type: :development
         
     | 
| 
       35 
35 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       36 
     | 
    
         
            -
              version_requirements:  
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
      
 36 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 37 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 38 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 39 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 40 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 41 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
       38 
42 
     | 
    
         
             
              name: jeweler
         
     | 
| 
       39 
     | 
    
         
            -
              requirement:  
     | 
| 
       40 
     | 
    
         
            -
                 
     | 
| 
       41 
     | 
    
         
            -
                requirements: 
         
     | 
| 
      
 43 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 44 
     | 
    
         
            +
                requirements:
         
     | 
| 
       42 
45 
     | 
    
         
             
                - - ">="
         
     | 
| 
       43 
     | 
    
         
            -
                  - !ruby/object:Gem::Version 
     | 
| 
       44 
     | 
    
         
            -
                    version:  
     | 
| 
      
 46 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 47 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       45 
48 
     | 
    
         
             
              type: :development
         
     | 
| 
       46 
49 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       47 
     | 
    
         
            -
              version_requirements:  
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
      
 50 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 51 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 52 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 53 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 54 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 55 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
       49 
56 
     | 
    
         
             
              name: simplecov
         
     | 
| 
       50 
     | 
    
         
            -
              requirement:  
     | 
| 
       51 
     | 
    
         
            -
                 
     | 
| 
       52 
     | 
    
         
            -
                requirements: 
         
     | 
| 
      
 57 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 58 
     | 
    
         
            +
                requirements:
         
     | 
| 
       53 
59 
     | 
    
         
             
                - - ">="
         
     | 
| 
       54 
     | 
    
         
            -
                  - !ruby/object:Gem::Version 
     | 
| 
       55 
     | 
    
         
            -
                    version:  
     | 
| 
      
 60 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 61 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       56 
62 
     | 
    
         
             
              type: :development
         
     | 
| 
       57 
63 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       58 
     | 
    
         
            -
              version_requirements:  
     | 
| 
      
 64 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 65 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 66 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 67 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 68 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       59 
69 
     | 
    
         
             
            description: |-
         
     | 
| 
       60 
70 
     | 
    
         
             
              An AES encrypt/decrypt gem built ontop of OpenSSL.  Not as quick as FastAES, but it doesn't require building
         
     | 
| 
       61 
71 
     | 
    
         
             
                  native extensions and supports Base64 encoded input and output.
         
     | 
| 
       62 
72 
     | 
    
         
             
            email: carl.hicks@gmail.com
         
     | 
| 
       63 
73 
     | 
    
         
             
            executables: []
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
74 
     | 
    
         
             
            extensions: []
         
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
            extra_rdoc_files: 
         
     | 
| 
      
 75 
     | 
    
         
            +
            extra_rdoc_files:
         
     | 
| 
       68 
76 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
       69 
77 
     | 
    
         
             
            - README.rdoc
         
     | 
| 
       70 
     | 
    
         
            -
            files: 
     | 
| 
       71 
     | 
    
         
            -
            - .document
         
     | 
| 
      
 78 
     | 
    
         
            +
            files:
         
     | 
| 
      
 79 
     | 
    
         
            +
            - ".document"
         
     | 
| 
       72 
80 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       73 
81 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
       74 
82 
     | 
    
         
             
            - README.rdoc
         
     | 
| 
         @@ -80,34 +88,26 @@ files: 
     | 
|
| 
       80 
88 
     | 
    
         
             
            - test/helper.rb
         
     | 
| 
       81 
89 
     | 
    
         
             
            - test/test_aes.rb
         
     | 
| 
       82 
90 
     | 
    
         
             
            homepage: http://github.com/chicks/aes
         
     | 
| 
       83 
     | 
    
         
            -
            licenses: 
     | 
| 
      
 91 
     | 
    
         
            +
            licenses:
         
     | 
| 
       84 
92 
     | 
    
         
             
            - MIT
         
     | 
| 
      
 93 
     | 
    
         
            +
            metadata: {}
         
     | 
| 
       85 
94 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       86 
95 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
       88 
     | 
    
         
            -
            require_paths: 
         
     | 
| 
      
 96 
     | 
    
         
            +
            require_paths:
         
     | 
| 
       89 
97 
     | 
    
         
             
            - lib
         
     | 
| 
       90 
     | 
    
         
            -
            required_ruby_version: !ruby/object:Gem::Requirement 
     | 
| 
       91 
     | 
    
         
            -
               
     | 
| 
       92 
     | 
    
         
            -
              requirements: 
         
     | 
| 
      
 98 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 99 
     | 
    
         
            +
              requirements:
         
     | 
| 
       93 
100 
     | 
    
         
             
              - - ">="
         
     | 
| 
       94 
     | 
    
         
            -
                - !ruby/object:Gem::Version 
     | 
| 
       95 
     | 
    
         
            -
                   
     | 
| 
       96 
     | 
    
         
            -
             
     | 
| 
       97 
     | 
    
         
            -
             
     | 
| 
       98 
     | 
    
         
            -
                  version: "0"
         
     | 
| 
       99 
     | 
    
         
            -
            required_rubygems_version: !ruby/object:Gem::Requirement 
         
     | 
| 
       100 
     | 
    
         
            -
              none: false
         
     | 
| 
       101 
     | 
    
         
            -
              requirements: 
         
     | 
| 
      
 101 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 102 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 103 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 104 
     | 
    
         
            +
              requirements:
         
     | 
| 
       102 
105 
     | 
    
         
             
              - - ">="
         
     | 
| 
       103 
     | 
    
         
            -
                - !ruby/object:Gem::Version 
     | 
| 
       104 
     | 
    
         
            -
                  version:  
     | 
| 
      
 106 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 107 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
       105 
108 
     | 
    
         
             
            requirements: []
         
     | 
| 
       106 
     | 
    
         
            -
             
     | 
| 
       107 
     | 
    
         
            -
            rubyforge_project: 
         
     | 
| 
       108 
     | 
    
         
            -
            rubygems_version: 1.8.12
         
     | 
| 
      
 109 
     | 
    
         
            +
            rubygems_version: 3.0.1
         
     | 
| 
       109 
110 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       110 
111 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       111 
112 
     | 
    
         
             
            summary: AES#encrypt(key, data), AES#decrypt(key, data). Capiche?
         
     | 
| 
       112 
113 
     | 
    
         
             
            test_files: []
         
     | 
| 
       113 
     | 
    
         
            -
             
     |