krypton 0.1.3 → 0.1.4
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 +4 -4
- data/.editorconfig +1 -0
- data/bin/krypton +10 -4
- data/lib/core/constants.rb +1 -1
- data/scripts/build-and-install.sh +13 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ea1222d75aae620b4e2be92a331c7923a7704b9
|
4
|
+
data.tar.gz: c95adc5e3ead2573810d77028c68bcb4737197a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 075b280c9a479242ca0b55bcea4ae096dd4af850277cf93d9cf6b53deacdb17ee72d6009f3f229c908dcd2ee3bb5dd31c9c5087412c9b8cf696e2ca889cb09ca
|
7
|
+
data.tar.gz: 2db9f133398e3786e6d2a256ce8f07712fbf166b9b964b6ec5710288d59a4c8c1955525db147c1d4044c8676d8470730f3312c962fb40dfcf8bef292735fe7d7
|
data/.editorconfig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
end_of_line = lf
|
data/bin/krypton
CHANGED
@@ -49,8 +49,9 @@ end.parse!(ARGV)
|
|
49
49
|
|
50
50
|
while (opt = ARGV.shift) do
|
51
51
|
case opt
|
52
|
+
|
53
|
+
# AESING
|
52
54
|
when 'encrypt'
|
53
|
-
#puts Krypton::AESCrypt.encrypt(ARGV[ARGV.length - 2], ARGV[ARGV.length - 1], options[:outfile]) if options[:raw]
|
54
55
|
result = Base64.encode64(Krypton::AESCrypt.encrypt(ARGV[ARGV.length - 2], ARGV[ARGV.length - 1], options[:outfile]))
|
55
56
|
if options[:std]
|
56
57
|
puts result.strip
|
@@ -59,7 +60,6 @@ while (opt = ARGV.shift) do
|
|
59
60
|
end
|
60
61
|
exit 0
|
61
62
|
when 'decrypt'
|
62
|
-
#puts Krypton::AESCrypt.decrypt(ARGV[ARGV.length - 2], ARGV[ARGV.length - 1], options[:outfile]) if options[:raw]
|
63
63
|
result = Krypton::AESCrypt.decrypt(Base64.decode64(ARGV[ARGV.length - 2]), ARGV[ARGV.length - 1], options[:outfile])
|
64
64
|
if options[:std]
|
65
65
|
puts result.strip
|
@@ -67,12 +67,18 @@ while (opt = ARGV.shift) do
|
|
67
67
|
puts "#{ARGV[ARGV.length - 2] + ' => '}#{Paint[result.strip, '#2ecc71']}"
|
68
68
|
end
|
69
69
|
exit 0
|
70
|
+
|
71
|
+
# HASHING
|
70
72
|
when 'hash'
|
71
|
-
|
73
|
+
|
74
|
+
data = ARGV[ARGV.length - 1] || gets
|
75
|
+
|
76
|
+
result = Krypton::SHA.hash(data, options[:raw])
|
77
|
+
|
72
78
|
if options[:std]
|
73
79
|
puts result.strip
|
74
80
|
else
|
75
|
-
puts "#{
|
81
|
+
puts "#{data + ' => '}#{Paint[result.strip, '#2ecc71']}"
|
76
82
|
end
|
77
83
|
exit 0
|
78
84
|
else
|
data/lib/core/constants.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: krypton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cbrnrd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -116,6 +116,7 @@ executables:
|
|
116
116
|
extensions: []
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
|
+
- ".editorconfig"
|
119
120
|
- ".gitignore"
|
120
121
|
- ".rspec"
|
121
122
|
- ".travis.yml"
|
@@ -134,6 +135,7 @@ files:
|
|
134
135
|
- lib/core/constants.rb
|
135
136
|
- lib/core/sha.rb
|
136
137
|
- lib/core/text.rb
|
138
|
+
- scripts/build-and-install.sh
|
137
139
|
- scripts/release_and_build.sh
|
138
140
|
homepage: https://github.com/cbrnrd/krypton
|
139
141
|
licenses:
|
@@ -155,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
157
|
version: '0'
|
156
158
|
requirements: []
|
157
159
|
rubyforge_project:
|
158
|
-
rubygems_version: 2.6.
|
160
|
+
rubygems_version: 2.6.14
|
159
161
|
signing_key:
|
160
162
|
specification_version: 4
|
161
163
|
summary: A command-line tool for easy encryption and decryption of data.
|