SHARE
TWEET

Untitled

a guest Nov 17th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string offsetCipher(string& text, int offset, string alphabet)
  2. {
  3.     string offStr = text;
  4.     for (auto &ch : offStr)
  5.         ch = alphabet[ (alphabet.find(ch) + offset) % alphabet.size()];
  6.     return offStr;  
  7. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top