private function containsValidCryptoConfig($algorithmConfig, $type)
    {
        return (
            array_key_exists($type, $algorithmConfig)
            && \is_array($algorithmConfig[$type])
            && array_key_exists('key', $algorithmConfig[$type])
            && array_key_exists('service', $algorithmConfig[$type])
        );
    }