Registry / crypto / paragonie-sodium-compat

paragonie-sodium-compat

JSON →
library2.5.0phppackagistunverified

Pure PHP implementation of libsodium; uses the PHP extension if it exists

composer require paragonie/sodium_compat
INSTALL
IMPORT
SIG · PARAGONIE-SODIUM-C
P
paragonie-sodium-compat
cryptophpv2.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Compat
✓ use ParagonIE\Sodium\Compat;

Generate a random 32-byte key using libsodium

use ParagonIE\Sodium\Compat; $key = Compat::randombytes_buf(32);
Debug
Known issues
gotchaIf the PHP sodium extension is available, it will be used instead of the pure PHP implementation, which may affect performance.
fix
Ensure the sodium extension is installed for optimal performance, or rely on the pure PHP fallback.
affects: all
Upgrade
Version history
2.5.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
24
Resources
paragonie-sodium-compat — pip install paragonie-sodium-compat · libregistry