protected function setEncoding($encoding)
    {
        if (false === in_array($encoding, $this->getEncodingAvailable())) {
            throw new Doozr_Crypt_Service_Exception(
                sprintf(
                    'Encoding "%s" not supported. Choose from: "%s".',
                    $encoding,
                    var_export($this->getEncodingAvailable(), true)
                )
            );
        }

        $this->encoding = $encoding;
    }