hashpasswd 0.1.2 → 0.2.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.
- data/lib/hashpasswd.rb +5 -0
- metadata +2 -2
data/lib/hashpasswd.rb
CHANGED
@@ -3,6 +3,7 @@ module Hashpasswd
|
|
3
3
|
ITERATIONS_INDEX = 1
|
4
4
|
SALT_INDEX = 2
|
5
5
|
HASH_INDEX = 3
|
6
|
+
DEFAULT_DELIMETER = ':'
|
6
7
|
|
7
8
|
require 'securerandom'
|
8
9
|
require 'base64'
|
@@ -59,4 +60,8 @@ module Hashpasswd
|
|
59
60
|
|
60
61
|
return pbkdf2 == testhash
|
61
62
|
end
|
63
|
+
|
64
|
+
def self.getconstants()
|
65
|
+
return {:HASH_SECTIONS => HASH_SECTIONS, :ITERATIONS_INDEX => ITERATIONS_INDEX, :SALT_INDEX => SALT_INDEX, :HASH_INDEX => HASH_INDEX, :DEFAULT_DELIMETER => DEFAULT_DELIMETER}
|
66
|
+
end
|
62
67
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hashpasswd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ dependencies: []
|
|
14
14
|
description: Password hashing and validation using OpenSSL::PKCS5::pbkdf2_hmac for
|
15
15
|
the hash and SecureRandom.base64 for the salt. Digest defaults to SHA1, but can
|
16
16
|
be set to any digest (eg SHA256) supported by your systems OpenSSL lib.
|
17
|
-
email:
|
17
|
+
email: funktacular@gmail.com
|
18
18
|
executables: []
|
19
19
|
extensions: []
|
20
20
|
extra_rdoc_files: []
|