Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
d05f4fa0
Commit
d05f4fa0
authored
Nov 08, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed hasher class to hash and hash method to make.
parent
c4aa6e6b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
application.php
application/config/application.php
+1
-1
auth.php
application/config/auth.php
+1
-1
hash.php
laravel/security/hash.php
+4
-4
No files found.
application/config/application.php
View file @
d05f4fa0
...
...
@@ -124,7 +124,7 @@ return array(
'Eloquent'
=>
'Laravel\\Database\\Eloquent\\Model'
,
'File'
=>
'Laravel\\File'
,
'Form'
=>
'Laravel\\Form'
,
'Hasher'
=>
'Laravel\\Security\\Hash
er
'
,
'Hasher'
=>
'Laravel\\Security\\Hash'
,
'HTML'
=>
'Laravel\\HTML'
,
'Inflector'
=>
'Laravel\\Inflector'
,
'Input'
=>
'Laravel\\Input'
,
...
...
application/config/auth.php
View file @
d05f4fa0
...
...
@@ -64,7 +64,7 @@ return array(
{
$user
=
User
::
where
(
$config
[
'username'
],
'='
,
$username
)
->
first
();
if
(
!
is_null
(
$user
)
and
Hash
er
::
check
(
$password
,
$user
->
password
))
if
(
!
is_null
(
$user
)
and
Hash
::
check
(
$password
,
$user
->
password
))
{
return
$user
;
}
...
...
laravel/security/hash
er
.php
→
laravel/security/hash.php
View file @
d05f4fa0
<?php
namespace
Laravel\Security
;
use
Laravel\Str
;
class
Hash
er
{
class
Hash
{
/**
* Hash a password using the Bcrypt hashing scheme.
...
...
@@ -13,17 +13,17 @@ class Hasher {
*
* <code>
* // Create a Bcrypt hash of a value
* $hash = Hash
er::hash
('secret');
* $hash = Hash
::make
('secret');
*
* // Use a specified number of iterations when creating the hash
* $hash = Hash
er::hash
('secret', 12);
* $hash = Hash
::make
('secret', 12);
* </code>
*
* @param string $value
* @param int $rounds
* @return string
*/
public
static
function
hash
(
$value
,
$rounds
=
8
)
public
static
function
make
(
$value
,
$rounds
=
8
)
{
return
crypt
(
$value
,
'$2a$'
.
str_pad
(
$rounds
,
2
,
'0'
,
STR_PAD_LEFT
)
.
'$'
.
static
::
salt
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment