vecrypt 0.0.0

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/vecrypt.rb +22 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 2e43a9b4ec85cda1edf0eb62643e47411aa04f1d98dbc1a8a0ef7e8e62e0fbc6
4
+ data.tar.gz: ab7c57fff99f136e6c7a1fad3e186e09e49bf77087e8f32f746fc090e4ca4c9d
5
+ SHA512:
6
+ metadata.gz: 406c791c39d73e52cb311cc0d38c1b8efff3cb95b158a0c9c2214b161c39f38fe5ececbb6ed266e6942aea12d8df6c169b2d4e43ace83cba6f70c51478a438f7
7
+ data.tar.gz: c41735fa10013b37c05d445845d16afcba298aa45f3f79a1b1ddf2399cd5a22bdb48fba25337e7c18aa112628a8c110e88fbfe2e3b4ebce7bc28b2c183a93122
data/lib/vecrypt.rb ADDED
@@ -0,0 +1,22 @@
1
+ require 'byebug'
2
+ require 'bcrypt'
3
+ class VeEncrypt
4
+ def initialize(password)
5
+ @salt = BCrypt::Engine.generate_salt
6
+ @password = BCrypt::Engine.hash_secret(password, @salt)
7
+ end
8
+ def encrypt
9
+ password = {salt: @salt, password: @password}
10
+ puts password
11
+ end
12
+ end
13
+ class VeDecrypt
14
+ def initialize(password,hash_password, salt)
15
+ @result = hash_password == BCrypt::Engine.hash_secret(password, salt)
16
+ end
17
+
18
+ def decrypt
19
+ result = @result
20
+ puts result
21
+ end
22
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vecrypt
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - velusamy Venkatraman
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2010-05-12 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Password Hash technique
14
+ email: velusamyvnp@gmail.com,
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/vecrypt.rb
20
+ homepage: ''
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.7.6
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: VeCrypt
44
+ test_files: []