mram-phpbb_hash 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -4,19 +4,20 @@ Mram::PhpbbHash
4
4
  i'm not exactly sure what, and why, the phpBB people are doing this crazy custom hashing. but if you ever need to authenticate against a phpBB user table, this gem will help you do exactly that.
5
5
 
6
6
  Usage
7
- =====
7
+ -----
8
8
 
9
9
  just include mram-phpbb\_hash in your Gemfile, and use it like this:
10
10
 
11
- > inputpass = params[:password] # from post variables, for example
12
- > phpbbhash = get\_hash\_from\_phpbb\_database(params[:user]) # whatever you need to do to get the hash from the database
13
- > if Mram::PhpbbHash.check\_hash(inputpass, phpbbhash) then
14
- > puts "success!"
15
- > else
16
- > puts "hash does not match!"
17
- > end
11
+ inputpass = params[:password] # from post variables, for example
12
+ phpbbhash = get_hash_from_phpbb_database(params[:user]) # whatever you need to do to get the hash from the database
13
+ if Mram::PhpbbHash.check_hash(inputpass, phpbbhash) then
14
+ puts "success!"
15
+ else
16
+ puts "hash does not match!"
17
+ end
18
18
 
19
19
  Other Info
20
- ==========
20
+ ----------
21
21
 
22
22
  the actual code was translated to ruby by me from [phpBB 3 Sources](https://github.com/phpbb/phpbb3/blob/develop/phpBB/includes/functions.php).
23
+ appearently, there was no other gem doing this so far..
@@ -66,5 +66,6 @@ module Mram
66
66
 
67
67
  module Exception
68
68
  class WrongHashTypeError < StandardError; end
69
+ class WtfError < StandardError; end
69
70
  end
70
71
  end
@@ -1,5 +1,5 @@
1
1
  module Mram
2
2
  module PhpbbHash
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mram-phpbb_hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: