MCPcopy Create free account
hub / github.com/OneMoreGres/ScreenTranslator / shuffle

Function shuffle

src/settings.cpp:59–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57const QString qs_showCaptured = "showCaptured";
58
59QString shuffle(const QString& source)
60{
61 if (source.isEmpty()) {
62 return source;
63 }
64 char encKeys[] = {14, 26, 99, 43};
65 std::string result = source.toStdString();
66 for (size_t i = 0, end = result.size(); i < end; ++i) {
67 result[i] = result[i] ^ encKeys[i % sizeof(encKeys)];
68 }
69 return QString::fromUtf8(result.data());
70}
71
72QStringList packSubstitutions(const Substitutions& source)
73{

Callers 4

saveMethod · 0.85
loadMethod · 0.85
parseMethod · 0.85
UpdaterMethod · 0.85

Calls 2

dataMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected