ParagonIE\Halite\File::getConfigSeal PHP Method

getConfigSeal() protected static method

Get the configuration for seal operations
protected static getConfigSeal ( integer $major, integer $minor ) : array
$major integer
$minor integer
return array
    protected static function getConfigSeal(int $major, int $minor) : array
    {
        if ($major === 2) {
            switch ($minor) {
                case 1:
                case 0:
                    return ['SHORTEST_CIPHERTEXT_LENGTH' => 100, 'BUFFER' => 1048576, 'HKDF_SALT_LEN' => 32, 'MAC_SIZE' => 32, 'PUBLICKEY_BYTES' => \Sodium\CRYPTO_BOX_PUBLICKEYBYTES, 'HKDF_SBOX' => 'Halite|EncryptionKey', 'HKDF_AUTH' => 'AuthenticationKeyFor_|Halite'];
            }
        } elseif ($major === 3) {
            switch ($minor) {
                case 0:
                    return ['SHORTEST_CIPHERTEXT_LENGTH' => 100, 'BUFFER' => 1048576, 'HKDF_SALT_LEN' => 32, 'MAC_SIZE' => 32, 'PUBLICKEY_BYTES' => \Sodium\CRYPTO_BOX_PUBLICKEYBYTES, 'HKDF_SBOX' => 'Halite|EncryptionKey', 'HKDF_AUTH' => 'AuthenticationKeyFor_|Halite'];
            }
        }
        throw new InvalidMessage('Invalid version tag');
    }