MCPcopy Create free account
hub / github.com/VASTDynamics/Vaporizer2 / XORDecrypt

Method XORDecrypt

VASTvaporizer/Source/Plugin/VASTAudioProcessor.cpp:2205–2228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2203}
2204
2205std::string VASTAudioProcessor::XORDecrypt(std::string a_sValue, std::string a_sKey)
2206{
2207 std::string instring;
2208 convertASCIIhexToString(instring, a_sValue);
2209
2210 std::string sRet;
2211 sRet = instring;
2212
2213 int idxVal = 0;
2214 int size_svalue = instring.length();
2215 int idxKey = 0;
2216 int size_skey = a_sKey.length();
2217
2218 while (idxVal < size_svalue)
2219 {
2220 sRet[idxVal] = sRet.at(idxVal) ^ a_sKey.at(idxKey);
2221 idxVal++;
2222 idxKey++;
2223 if (idxKey >= size_skey)
2224 idxKey = 0;
2225 }
2226
2227 return sRet;
2228}
2229JUCE_END_IGNORE_WARNINGS_MSVC
2230JUCE_END_IGNORE_WARNINGS_GCC_LIKE
2231

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected