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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1542eca097e78121c010021cc454b96c8c5ef1dd
4
- data.tar.gz: 6ba468faba8c480f8df1080bc7a821b7f6f964c0
3
+ metadata.gz: 4ea1222d75aae620b4e2be92a331c7923a7704b9
4
+ data.tar.gz: c95adc5e3ead2573810d77028c68bcb4737197a4
5
5
  SHA512:
6
- metadata.gz: 07111d7a9829ab029fc9298b50bfeff101429a1349f5fd34fcb9f9d81aa95520b57f4d7f6e595ecd174571a507bd2e91e14f7693bd9fbc190eb74de0f4715489
7
- data.tar.gz: 7a815f2d34bb09ad9d5ec829a6db7f2e85a7757e1d8c4b7b7c9551e059497e28fb01b6124cc840d05a90557422103a8ffe7ba4649d7846d715a5cf4efdb40cd8
6
+ metadata.gz: 075b280c9a479242ca0b55bcea4ae096dd4af850277cf93d9cf6b53deacdb17ee72d6009f3f229c908dcd2ee3bb5dd31c9c5087412c9b8cf696e2ca889cb09ca
7
+ data.tar.gz: 2db9f133398e3786e6d2a256ce8f07712fbf166b9b964b6ec5710288d59a4c8c1955525db147c1d4044c8676d8470730f3312c962fb40dfcf8bef292735fe7d7
@@ -0,0 +1 @@
1
+ end_of_line = lf
@@ -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
- result = Krypton::SHA.hash(ARGV[ARGV.length - 1], options[:raw])
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 "#{ARGV[ARGV.length - 1] + ' => '}#{Paint[result.strip, '#2ecc71']}"
81
+ puts "#{data + ' => '}#{Paint[result.strip, '#2ecc71']}"
76
82
  end
77
83
  exit 0
78
84
  else
@@ -1,4 +1,4 @@
1
- VERSION = "0.1.3"
1
+ VERSION = "0.1.4"
2
2
  AUTHORS = {
3
3
  'Carter Brainerd' => '0xCB[at]protonmail[dot]com'
4
4
  }
@@ -0,0 +1,13 @@
1
+ #!/bin/bash
2
+
3
+ cd ..
4
+
5
+ CURRENT_VERSION=$(cat lib/core/constants.rb | grep VERSION | cut -d '"' -f 2)
6
+
7
+ TO_UPDATE=(
8
+ lib/core/constants.rb
9
+ )
10
+
11
+ gem build krypton.gemspec
12
+
13
+ gem install krypton-$CURRENT_VERSION.gem
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.3
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-17 00:00:00.000000000 Z
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.13
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.