a guest Nov 17th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- string offsetCipher(string& text, int offset, string alphabet)
- string offStr = text;
- for (auto &ch : offStr)
- ch = alphabet[ (alphabet.find(ch) + offset) % alphabet.size()];
- return offStr;
RAW Paste Data