How to compute uniqueId?

Dear community,

I hope this is not a stupid question, but I couldn’t find it in the documentation: How does Juce compute a VST3 plugin’s uniqueId from the classId?

It’s said to be some sort of hash, but how exactly?

My use case is that I want to match the classId found in a .vstpreset file to the associated plugin as defined by Juce’s PluginDescription.

In juce_VST3PluginFormatImpl.h we have:

description.uniqueId = getHashForRange (getNormalisedTUID (uid->data()));

The definitions of getHashForRange() and getNormalisedTUID are in the same file.

Fantastic! Thanks a million Reuben for the swift and concise answer. This is exactly what I was looking for.