mirror of
https://github.com/php/php-src.git
synced 2026-04-29 03:03:26 +02:00
145ffd93fc
libsodium measures the memory cost in bytes, while password_hash() and friends expect kibibyte values. We have to properly map between these scales not only when calling libsodium functions, but also when checking for allowed values. We also refactor to rid the code duplication.
libsodium-php
A simple, low-level PHP extension for libsodium.
Full documentation here: Using Libsodium in PHP Projects, a guide to using the libsodium PHP extension for modern, secure, and fast cryptography.