2006-02-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
[mono.git] / mcs / class / ByteFX.Data / Common / Security.cs
1 using System;\r
2 \r
3 namespace ByteFX.Data.Common\r
4 {\r
5         /// <summary>\r
6         /// Summary description for Security.\r
7         /// </summary>\r
8         internal class Security\r
9         {\r
10                 public Security()\r
11                 {\r
12                 }\r
13 \r
14                 public static void ArrayCrypt( byte[] src, int srcoff, byte[] dst, int dstoff, byte[] key, int length )\r
15                 {\r
16                         int idx = 0;\r
17 \r
18                         while ( (idx+srcoff) < src.Length && idx < length )\r
19                         {\r
20                                 dst[idx+dstoff] = (byte)(src[idx+srcoff] ^ key[idx]);\r
21                                 idx++;\r
22                         }\r
23                 }\r
24         }\r
25 }\r