Skip to content

Instantly share code, notes, and snippets.

@ilpropheta
Created June 4, 2016 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilpropheta/bdd96ba280e10f2a0a282c6586dc9258 to your computer and use it in GitHub Desktop.
Save ilpropheta/bdd96ba280e10f2a0a282c6586dc9258 to your computer and use it in GitHub Desktop.
string s; // to encrypt
for (auto& c : s)
{
c = char((c-'0' + K)%10 + '0');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment