This project is a PHP extension, written with Zephir to wrap the libsodium library in a object-oriented layer.
Basically, it aims to provide a clean, easy and safe alternative to the original bindings of the cryptographic library.
At this point, three API's are already available:
Hashing with BLAKE2b.
AEAD (Advanced Encryption with Associated Data).
SecretBox (Secret-key authenticated encryption with XSalsa20 and Poly1305).
Usage:
The library aims to be really easy to use.
Hashing:
AEAD:
SecretBox:
Technology Stack:
About libsodium:
Sodium is a modern, easy-to-use software library for encryption, decryption, signatures, password
hashing and more.
About Zephir:
Zephir, an open source, high-level language designed to ease the creation and maintainability of
extensions for PHP with a focus on type and memory safety.
Roadmap:
Current features to be included are:
Constant-time helpers and safe evaluation of sensitive values.
Public-key Encryption.
Stand-alone message authentication.
Bind Zephir optimizers to calls on the libsodium directly.
Documentation
.phpt tests.
How to contribute?
Join the PHP discussions over the Discord PHP channel @ SteemDevs