1

I tried to do like in this topic: Symfony 2 authentication with (doctrine) Entity And I don't know what to do with the getSalt() method, I don't want to use salt so I try getSalt() returning null but it doesn't work. Please, can anyone help me?

PS: Sorry for my poor english.

1 Answer 1

7

The salt is a string (usually derived from a one-way hashing function) that is prefixed the password before the chosen encoding function is applied. It can be a fixed string if you like, and it can also be an empty one.

public function getSalt() {
    return ''; // Could also be 'mysalt'
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.