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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 656588a43c2b38fd768160ea524e05e05c0ddd71
|
4
|
+
data.tar.gz: 5e656369577a472d8b46c843f5b4090f294319f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 091f51ccf2df451583fae56036f8daba810183dade625bec219efca9925b8b0730b6d5f042ce0e2a98f35ab7334cfe9fc3a18a924e6246b52c37709b91dc1bc2
|
7
|
+
data.tar.gz: 7952a8f07597323697fca06a876826dc9b94796f2444e78ea0c4822a68675afa7647b92d119fe109d58b3d718b4c802eb6a4c47db05e9e9ce3de4fcbc57348ff
|
data/lib/crypto-toolbox.rb
CHANGED
@@ -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
|
|
@@ -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
|
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.
|
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
|