Legacy implementations of Halite (can be loaded alongside Halite to facilitate migrations)

v0.1.0 2019-03-18 15:01 UTC

This package is auto-updated.

Last update: 2024-07-19 10:05:47 UTC


See Halite for documentation, etc.

This library allows you to side-load an unsupported legacy version of Halite into your application in order to migrate data to the newest version.


This library is out of scope for any bug bounty programs!

Please refer to Halite for a library that is in-scope.


Use Composer.

composer require paragonie/halite-legacy

Migrating Code

Simply use the legacy classes to facilitate decryption, and re-encrypt with the latest version of Halite.

use ParagonIE\Halite\Symmetric\{
use ParagonIE\HaliteLegacy\V3\Symmetric\{
    Crypto as LegacyCrypto,
    EncryptionKey as LegacyKey
use ParagonIE\HaliteLegacy\V3\HiddenString as LegacyHiddenString;
use ParagonIE\HiddenString\HiddenString;

 * @var EncryptionKey $encKey
 * @var LegacyKey $oldKey
 * @var string $ciphertext
 * @var LegacyHiddenString $plaintext
$plaintext = LegacyCrypto::decrypt($ciphertext, $oldKey);
$storeMe = Crypto::encrypt(
    new HiddenString($plaintext->getString()),

Support Contracts

If your company uses this library in their products or services, you may be interested in purchasing a support contract from Paragon Initiative Enterprises.

Unpaid support will not be provided for halite-legacy.