+ // Ensure that we have the <cloak:key> parameter.
+ const std::string key = tag->getString("key");
+ if (key.empty())
+ throw ModuleException("You have not defined a cloaking key. Define <cloak:key> as a " + ConvToStr(minkeylen) + "+ character network-wide secret, at " + tag->getTagLocation());
+
+ // If we are the first cloak method then mandate a strong key.
+ if (i == tags.first && key.length() < minkeylen)
+ throw ModuleException("Your cloaking key is not secure. It should be at least " + ConvToStr(minkeylen) + " characters long, at " + tag->getTagLocation());