PHP Classes
elePHPant
Icontem

Halite: Perform cryptography operations with libsodium

Recommend this page to a friend!
  Info   View files Documentation   View files View files (116)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2016-01-14 (9 months ago) RSS 2.0 feedNot enough user ratingsTotal: 102 This week: 1All time: 8,453 This week: 1,047Up
Version License PHP version Categories
paragonie-halite 1.0GNU General Publi...7.0.0PHP 5, Cryptography, Security
Description Author

This package can perform cryptography operations with libsodium. Currently it can:

- Encrypt and decrypt data with a given key
- Seal and unseal data with a given public key
- Encrypt and decrypt data with given public and private keys
- Authenticate and verify data with a given authentication key
- Sign and verify data with a given signature key

Innovation Award
PHP Programming Innovation award nominee
January 2016
Number 13
Sodium is a robust high security library for performing several types cryptography operations.

While it was somewhat inspired in NaCl library from Daniel J. Bernstein, Sodium has several advantages like being easily available on different platforms that PHP runs on.

This package implements a wrapper to execute the cryptography operations provided by libsodium using the PECL libsodium extension.

Manuel Lemos
Picture of Scott Arciszewski
  Performance   Level  
Innovation award
Innovation award
Nominee: 2x

Details

Halite

Build Status

Halite is a high-level cryptography interface that relies on libsodium for all of its underlying cryptography operations.

Halite was created by Paragon Initiative Enterprises as a result of our continued efforts to improve the ecosystem and make cryptography in PHP safer and easier to implement.

It's released under the GPLv3 license. Commercial licenses are available from Paragon Initiative Enterprises if you wish to implement Halite in an application without making your source code available under a GPL-compatible license.

Attention: master is the Development Branch (Version 2)

See stable for version 1.x.

Using Halite in Your Applications

  1. Install Libsodium and the PHP Extension
  2. composer require paragonie/halite

Halite Version 2 requires PHP 7.0.0 or newer!

Using Halite in Your Project

Check out the documentation. The basic Halite API is designed for simplicity:

* Encryption

* Symmetric
   * `Symmetric\Crypto::encrypt`(`string`, EncryptionKey, `bool?`): `string`
   * `Symmetric\Crypto::decrypt`(`string`, EncryptionKey, `bool?`): `string`
* Asymmetric
   * Anonymous
     * `Asymmetric\Crypto::seal`(`string`, EncryptionPublicKey, `bool?`): `string`
     * `Asymmetric\Crypto::unseal`(`string`, EncryptionSecretKey, `bool?`): `string`
   * Authenticated
     * `Asymmetric\Crypto::encrypt`(`string`, EncryptionSecretKey, EncryptionPublicKey, `bool?`): `string`
     * `Asymmetric\Crypto::decrypt`(`string`, EncryptionSecretKey, EncryptionPublicKey, `bool?`): `string`

* Authentication

* Symmetric
   * `Symmetric\Crypto::authenticate`(`string`, AuthenticationKey, `bool?`): `string`
   * `Symmetric\Crypto::verify`(`string`, AuthenticationKey, `string`, `bool?`): `bool`
* Asymmetric
   * `Asymmetric\Crypto::sign`(`string`, SignatureSecretKey, `bool?`): `string`
   * `Asymmetric\Crypto::verify`(`string`, SignaturePublicKey, `string`, `bool?`): `bool`
  Files folder image Files  
File Role Description
Files folder imagedoc (4 files, 1 directory)
Files folder imagesrc (11 files, 6 directories)
Files folder imagetest (1 file, 1 directory)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file autoload.php Aux. Auxiliary script
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:102
This week:1
All time:8,453
This week:1,047Up