<?php

namespace CookieSession\Storage;


use CookieSession\Encrypter\Encrypter;

interface StorageInterface
{
    /**
     * @param $string
     *
     * @return StorageInterface
     */
    public function set($string);

    /**
     * @return string
     */
    public function get();

    /**
     * @return StorageInterface
     */
    public function encrypt();

    /**
     * @return StorageInterface
     */
    public function decrypt();

    /**
     * @return StorageInterface
     */
    public function compress();

    /**
     * @return StorageInterface
     */
    public function decompress();

    /**
     * @return StorageInterface
     */
    public function encode();

    /**
     * @return StorageInterface
     */
    public function decode();

    /**
     * @param Encrypter $encrypter
     *
     * @return $this
     */
    public function setEncrypter(Encrypter $encrypter);

    /**
     * @return Encrypter|null
     * @throws \Exception
     */
    public function getEncrypter();
}