krypton 0.1.1 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1ddfc86674c74551b4a49546966c7da0db8d430a
4
- data.tar.gz: 199f45c9a050ce42ec5d7cfbe96f39eed04c800e
2
+ SHA256:
3
+ metadata.gz: 13cc16003ed6ba4cb33f16121c9eabebead852c86c4afce9a741f29e96c46a29
4
+ data.tar.gz: ed4c40a2a268370f4671bd0ed38505814a23be8275050e58adc59f9b305a0045
5
5
  SHA512:
6
- metadata.gz: 9524fcf88360b0860f542fbcb4fa15f2bdc14c9328abaf0850db29ce63c54a6d6ae466db52e2019f2f66317add07c9c88cb417917d445b1e48d67f82fef43810
7
- data.tar.gz: b5efc23762f7138954965594285860ae622d81e563671a14f2387c3e8375bcaf26be77ce3377a448f8cb588498882b4e107077ee6785c2177fadc41e3df66324
6
+ metadata.gz: 416a4f5be68dfdb227eb9b44183d3e2a4a43c6f9bd01ab39caf69308a76fefba31b073e16663242a4992310e68938f834a3a0d1c23f80c5fdfb82ca8579df9cb
7
+ data.tar.gz: 502fe088cd81cc66cf8f66620bb0dbdf10a6cccef0164b6ad4fc2f7f88a3dfef835e6ffae4093f5306753a87cb5e19f11df4f05d57badf8a2cf1aad978ae1621
data/.gitignore CHANGED
File without changes
data/.rspec CHANGED
File without changes
File without changes
File without changes
data/Gemfile CHANGED
File without changes
File without changes
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
File without changes
@@ -56,7 +56,8 @@ while (opt = ARGV.shift) do
56
56
  puts "#{ARGV[ARGV.length - 2] + ' => '}#{Paint[result.strip, '#2ecc71']}"
57
57
  exit 0
58
58
  when 'hash'
59
- puts "This feature is not implemented yet but is coming soon."
59
+ result = Krypton::SHA.hash(ARGV[ARGV.length - 1], options[:raw])
60
+ puts "#{ARGV[ARGV.length - 1] + ' => '}#{Paint[result.strip, '#2ecc71']}"
60
61
  exit 0
61
62
  else
62
63
  puts "#{opt} is not a valid action!"
data/bin/setup CHANGED
File without changes
@@ -3,7 +3,7 @@ require "core"
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "krypton"
6
- spec.version = '0.1.1'
6
+ spec.version = VERSION
7
7
  spec.authors = ["cbrnrd"]
8
8
  spec.email = ["0xCB@protonmail.com"]
9
9
  spec.summary = %q{A command-line tool for easy encryption and decryption of data.}
@@ -7,6 +7,7 @@ require 'paint'
7
7
  require_relative './core/constants.rb'
8
8
  require_relative './core/aes.rb'
9
9
  require_relative './core/text.rb'
10
+ require_relative './core/sha.rb'
10
11
 
11
12
  module Krypton
12
13
  end
File without changes
@@ -1,4 +1,4 @@
1
- VERSION = "0.1.1"
1
+ VERSION = "0.1.2"
2
2
  AUTHORS = {
3
3
  'Carter Brainerd' => '0xCB[at]protonmail[dot]com'
4
4
  }
@@ -0,0 +1,13 @@
1
+ require 'digest'
2
+
3
+ module Krypton
4
+ class SHA
5
+ def self.hash(data, raw=false)
6
+ if raw
7
+ return Digest::SHA256.hexdigest(data)
8
+ else
9
+ return Digest::SHA256.base64digest(data)
10
+ end
11
+ end
12
+ end
13
+ end
File without changes
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.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - cbrnrd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-19 00:00:00.000000000 Z
11
+ date: 2018-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  version: '0'
155
155
  requirements: []
156
156
  rubyforge_project:
157
- rubygems_version: 2.6.13
157
+ rubygems_version: 2.7.3
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: A command-line tool for easy encryption and decryption of data.