private function assertValidAlgorithmConfiguration(array $algorithmConfig)
    {
        if (!array_key_exists('id', $algorithmConfig)
            || !$this->containsValidCryptoConfig($algorithmConfig, 'decryption')
            || !$this->containsValidCryptoConfig($algorithmConfig, 'encryption')
        ) {
            throw new InvalidAlgorithmConfigurationException();
        }
    }