| 2178 | JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE("-Wconversion") |
| 2179 | JUCE_BEGIN_IGNORE_WARNINGS_MSVC(4244 4267) |
| 2180 | std::string VASTAudioProcessor::XOREncrypt(std::string a_sValue, std::string a_sKey) |
| 2181 | { |
| 2182 | std::string sRet; |
| 2183 | sRet = a_sValue; |
| 2184 | |
| 2185 | int idxVal = 0; |
| 2186 | int size_svalue = a_sValue.length(); |
| 2187 | int idxKey = 0; |
| 2188 | int size_skey = a_sKey.length(); |
| 2189 | |
| 2190 | while (idxVal < size_svalue) |
| 2191 | { |
| 2192 | sRet[idxVal] = sRet.at(idxVal) ^ a_sKey.at(idxKey); |
| 2193 | idxVal++; |
| 2194 | idxKey++; |
| 2195 | if (idxKey >= size_skey) |
| 2196 | idxKey = 0; |
| 2197 | } |
| 2198 | |
| 2199 | std::string hexRepr; |
| 2200 | convertToASCIIhex(hexRepr, sRet); |
| 2201 | |
| 2202 | return hexRepr; |
| 2203 | } |
| 2204 | |
| 2205 | std::string VASTAudioProcessor::XORDecrypt(std::string a_sValue, std::string a_sKey) |
| 2206 | { |
nothing calls this directly
no outgoing calls
no test coverage detected