cryptatron 0.0.1 → 0.0.2

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.
@@ -8,10 +8,18 @@ module Cryptatron
8
8
  @cipher = Gibberish::AES.new(@key, @key.length)
9
9
 
10
10
  def self.encrypt(body)
11
- Base64.strict_encode64 @cipher.encrypt(body, binary: true)
11
+ begin
12
+ Base64.strict_encode64 @cipher.encrypt(body, binary: true)
13
+ rescue
14
+ nil
15
+ end
12
16
  end
13
17
 
14
18
  def self.decrypt(body)
15
- @cipher.decrypt(body)
19
+ begin
20
+ @cipher.decrypt(body)
21
+ rescue
22
+ nil
23
+ end
16
24
  end
17
25
  end
@@ -1,3 +1,3 @@
1
1
  module Cryptatron
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptatron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -53,7 +53,7 @@ files:
53
53
  - .gitignore
54
54
  - Gemfile
55
55
  - Rakefile
56
- - crypt-a-tron.gemspec
56
+ - cryptatron.gemspec
57
57
  - lib/cryptatron.rb
58
58
  - lib/cryptatron/version.rb
59
59
  homepage: