wiki/content/20201112133736-sodium_password_encoder.md

25 lines
532 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-30 17:04:36 +00:00
date: 20201112
2024-05-06 20:40:05 +00:00
id: ebc9cf71-62ed-44fa-98c6-b2d01fbd69fe
title: Sodium password encoder
---
# Description
In Symfony 4.3, the [Symfony Argon2i Password
Hasher](20201110152730-symfony_argon2i_password_hasher) is deprecated.
`SodiumPasswordEncoder` is used instead. Best practice since [Symfony
4.3](20201112120118-symfony_4_3) is to use the [native
encoder](20201112135851-symfony_native_encoder).
# Syntax
``` yaml
# config/packages/security.yml
security:
# ...
encoders:
App\Entity\User:
algorithm: sodium
```