crypto-toolbox 0.2.0 → 0.2.1

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: 4320550287da780cb774d8b1b9e6ccf4f70fd76c
4
- data.tar.gz: a0ae96f1ba1ff80865170ac5039e8d7f7b336ad0
3
+ metadata.gz: 656588a43c2b38fd768160ea524e05e05c0ddd71
4
+ data.tar.gz: 5e656369577a472d8b46c843f5b4090f294319f9
5
5
  SHA512:
6
- metadata.gz: 810fcc968c3fa8b2eda0da1f3f237089eb8a7055747e530f167811818f31ada3cc8cc923c6efb27dbac79d36d8174058304ee1b5fa0311db21e6bad7a785499e
7
- data.tar.gz: 30af84eb827a70800f0fea71c0d844eed1e7b4d530a863cfab98983885e128bd193a86bd47b17da5541604216d24cdb652210b3e7606e6bf9d2f16110ac85841
6
+ metadata.gz: 091f51ccf2df451583fae56036f8daba810183dade625bec219efca9925b8b0730b6d5f042ce0e2a98f35ab7334cfe9fc3a18a924e6246b52c37709b91dc1bc2
7
+ data.tar.gz: 7952a8f07597323697fca06a876826dc9b94796f2444e78ea0c4822a68675afa7647b92d119fe109d58b3d718b4c802eb6a4c47db05e9e9ce3de4fcbc57348ff
@@ -13,7 +13,7 @@ require 'crypto-toolbox/analyzers/padding_oracle.rb'
13
13
  require 'crypto-toolbox/analyzers/cbc_mac.rb'
14
14
  require 'crypto-toolbox/analyzers/vigenere_xor.rb'
15
15
 
16
-
16
+ require 'crypto-toolbox/ciphers/aes.rb'
17
17
  require 'crypto-toolbox/ciphers/caesar.rb'
18
18
  require 'crypto-toolbox/ciphers/rot13.rb'
19
19
 
@@ -4,7 +4,7 @@ module Analyzers
4
4
  module Utils
5
5
  class SpellChecker
6
6
 
7
- def initialize(dict_lang="en_GB")
7
+ def initialize(dict_lang="en_US")
8
8
  @dict = FFI::Hunspell.dict(dict_lang)
9
9
  end
10
10
  =begin
@@ -0,0 +1,17 @@
1
+ module Ciphers
2
+ class Aes
3
+
4
+ def initialize(keysize,mode)
5
+ @cipher = OpenSSL::Cipher::AES.new(keysize,mode)
6
+ end
7
+
8
+ def decipher(input,key)
9
+ @cipher.decrypt
10
+ @cipher.key = key
11
+ (@cipher.update(input) + @cipher.final)
12
+ end
13
+
14
+ def encipher(input,key)
15
+ end
16
+ end
17
+ end
@@ -49,8 +49,8 @@ module CryptoChallanges
49
49
  end
50
50
 
51
51
  def solve7(input,key)
52
+ data = CryptBuffer.from_base64(input).str
53
+ Ciphers::Aes.new(128,:ECB).decipher(data,key)
52
54
  end
53
-
54
-
55
55
  end
56
56
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crypto-toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Sivia
@@ -66,6 +66,7 @@ files:
66
66
  - lib/crypto-toolbox/analyzers/utils/letter_frequency.rb
67
67
  - lib/crypto-toolbox/analyzers/utils/spell_checker.rb
68
68
  - lib/crypto-toolbox/analyzers/vigenere_xor.rb
69
+ - lib/crypto-toolbox/ciphers/aes.rb
69
70
  - lib/crypto-toolbox/ciphers/caesar.rb
70
71
  - lib/crypto-toolbox/ciphers/rot13.rb
71
72
  - lib/crypto-toolbox/crypt_buffer.rb