clearance_crypto 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/lib/clearance_crypto.rb +1 -1
- data/lib/clearance_crypto/bcrypt.rb +2 -2
- metadata +2 -2
data/History.txt
CHANGED
data/lib/clearance_crypto.rb
CHANGED
@@ -14,12 +14,12 @@ module ClearanceCrypto
|
|
14
14
|
|
15
15
|
# Creates a BCrypt hash for the password passed.
|
16
16
|
def encrypt(string)
|
17
|
-
::BCrypt::Password.create(string)
|
17
|
+
::BCrypt::Password.create("--#{salt}--#{string}--")
|
18
18
|
end
|
19
19
|
|
20
20
|
# Does the hash match the tokens? Uses the same tokens that were used to encrypt.
|
21
21
|
def authenticated?(string)
|
22
|
-
::BCrypt::Password.new(self.encrypted_password) == string rescue false
|
22
|
+
::BCrypt::Password.new(self.encrypted_password) == "--#{salt}--#{string}--" rescue false
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clearance_crypto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Moen
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-02-
|
12
|
+
date: 2009-02-17 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|