Advertisement
Guest User

Encrypt File (with rewriting)

a guest
Dec 24th, 2014
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.30 KB | None | 0 0
  1.     static void Encrypt(string pathToFile)
  2.         {
  3.             byte[] bytes = File.ReadAllBytes(pathToFile);
  4.             for (int i = 0; i < bytes.Length; i++)
  5.             {
  6.                 bytes[i] = (byte)(bytes[i] + 128);
  7.             }
  8.             File.WriteAllBytes(pathToFile,bytes);
  9.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement