private function getCipherMethod($encType = CryptographyProviderInterface::PROPERTY_ENCRYPTION)
    {
        $method = $this->settings['cipher_method'][$encType];
        $supportedMethods = openssl_get_cipher_methods();

        if (!in_array($method, $supportedMethods)) {
            throw new EncryptionException('Method '.$method.' not supported by openssl installation.');
        }

        return $method;
    }