Skip to content

Commit ca12b07

Browse files
authored
Merge pull request #398 from muskie9/refactor/encryptorConfig
REFACTOR don’t explicitly set new encryptor
2 parents 7a15cea + 4764a21 commit ca12b07

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

_config/config.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,3 @@ SilverStripe\Core\Injector\Injector:
2828
properties:
2929
format: '%Region/%Name'
3030

31-
SilverStripe\Security\Security:
32-
password_encryption_algorithm: 'bcrypt'
33-
34-
'SilverStripe\Security\PasswordEncryptor':
35-
encryptors:
36-
bcrypt:
37-
'Dynamic\FoxyStripe\Security\PasswordEncryptor_BCrypt':

src/Security/PasswordEncryptor_BCrypt.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Dynamic\FoxyStripe\Security;
44

55
use SilverStripe\Security\PasswordEncryptor;
6+
use SilverStripe\Security\PasswordEncryptor_EncryptionFailed;
67

78
/**
89
* Class PasswordEncryptor_BCrypt
@@ -46,8 +47,10 @@ public static function get_cost()
4647

4748
/**
4849
* @param String $password
50+
* @param null $salt
4951
* @param null $member
50-
* @return bool|string
52+
* @return bool|String
53+
* @throws PasswordEncryptor_EncryptionFailed
5154
*/
5255
public function encrypt($password, $salt = null, $member = null)
5356
{
@@ -63,6 +66,8 @@ public function encrypt($password, $salt = null, $member = null)
6366
/**
6467
* @param string $hash
6568
* @param string $password
69+
* @param null $salt
70+
* @param null $member
6671
* @return bool
6772
*/
6873
public function check($hash, $password, $salt = null, $member = null)

0 commit comments

Comments
 (0)