paragonie / halite

High-level cryptography interface powered by libsodium
https://paragonie.com/project/halite
Mozilla Public License 2.0
1.13k stars 85 forks source link

invalid version tag when migrating from halite 4.8.0 to 5.1.0 #187

Open duronrulez opened 1 year ago

duronrulez commented 1 year ago

We've recently tried to upgrade our halite version from 4.8.0 to 5.1.0, but as soon as the upgrade finished we started receiving "invalid version tag" exceptions:

$symmetricKey = KeyFactory::deriveEncryptionKey(
        new HiddenString(XX_PASSPHRASE_XX),
        base64_decode(SALT__XX__XX), 
        KeyFactory::INTERACTIVE,
        SODIUM_CRYPTO_PWHASH_ALG_ARGON2I13
);

$resource = fopen('php://memory', 'w+');
File::decrypt(new Halite\Stream\ReadOnlyFile(self::ENCRYPTION_STORAGE.$keyName.'Private.key'), new Halite\Stream\MutableFile($resource), $symmetricKey);

Is there possibly a breaking change between the 2 versions that we're not aware of?