password_hasher 0.1.0 → 1.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.
- checksums.yaml +4 -4
- data/README.md +9 -7
- data/lib/password_hasher/version.rb +1 -1
- data/lib/password_hasher.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3fa1b45bff1f973c7aeec8774e852e09d1719f9
|
4
|
+
data.tar.gz: 39ccf524f47368c0985619d1416daceaf7628480
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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/
|
32
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/riggleg/password_hasher.
|
31
33
|
|
32
34
|
|
33
35
|
## License
|
data/lib/password_hasher.rb
CHANGED