password_hasher 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d3d5200addbaa0173c61dab01de421250330c593
4
- data.tar.gz: c8d79498f1443ba21a2d61ea3d54aff93bb82385
3
+ metadata.gz: f3fa1b45bff1f973c7aeec8774e852e09d1719f9
4
+ data.tar.gz: 39ccf524f47368c0985619d1416daceaf7628480
5
5
  SHA512:
6
- metadata.gz: 6317d71b0725f651b1f185de847c4ebee7a1e84692d314d809fb481caf8756dcf38cea23ae3d5b7aa829549b29a8713c5909d593181bb3f057d573f259a76ea6
7
- data.tar.gz: 49ab646da21b4949df30797646d4bbdccae9955e4cd606caacbf5831368e421bd8c73fa9b68a9c327a71ee46a3b47589057d06060f41351262e4b37409e739f0
6
+ metadata.gz: a090b5fe7d6210fad8519cc49dd39edb475a0807e66d36d27037c178bc7359eaac5db1427986611f363f00825020ad48041b672f1c3cee398a03429ac0fa2406
7
+ data.tar.gz: 2f34c8931f64421a4547cb0baaa4b564170d83aafaa9059e5c0c1ecf5b82c795d42b7f0d8c60caeff27fcabeff6d9e326b9ac40ceb79b13d5279520d2eb66b45
data/README.md CHANGED
@@ -17,17 +17,19 @@ Or install it yourself as:
17
17
 
18
18
  ## Usage
19
19
 
20
+ ```ruby
21
+ password = "goodpass"
22
+ hashed_password = PasswordHasher.hash_password(password)
23
+ #hashed_password == something like "sha1:1000:9NYDQj80ksetV+0uW/6VAJwXKTGDqKyv:SnRzqabSk/Kpmb9C109NIv+zbHArz4kg"
24
+ validated = PasswordHasher.validate_password("goodpass", hashed_password)
25
+ #validated == true
26
+ ```
20
27
 
21
-
22
- ## Development
23
-
24
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake false` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
25
-
26
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
+ PasswordHasher will automatically add salt and the number of iterations and return those values in the string.
27
29
 
28
30
  ## Contributing
29
31
 
30
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/password_hasher.
32
+ Bug reports and pull requests are welcome on GitHub at https://github.com/riggleg/password_hasher.
31
33
 
32
34
 
33
35
  ## License
@@ -1,3 +1,3 @@
1
1
  module PasswordHasher
2
- VERSION = "0.1.0"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -80,5 +80,9 @@ module PasswordHasher
80
80
  @@allPass = false
81
81
  end
82
82
  end
83
-
83
+ class <<self
84
+ alias_method :create_hash, :createHash
85
+ alias_method :validate_hash, :validatePassword
86
+ alias_method :hash_password, :createHash
87
+ end
84
88
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: password_hasher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Hornby