wasSharp – Diff between revs 39 and 52
?pathlinks?
Rev 39 | Rev 52 | |||
---|---|---|---|---|
Line 3... | Line 3... | |||
3 | // Please see: http://www.gnu.org/licenses/gpl.html for legal details, // |
3 | // Please see: http://www.gnu.org/licenses/gpl.html for legal details, // |
|
4 | // rights of fair usage, the disclaimer and warranty conditions. // |
4 | // rights of fair usage, the disclaimer and warranty conditions. // |
|
5 | /////////////////////////////////////////////////////////////////////////// |
5 | /////////////////////////////////////////////////////////////////////////// |
|
Line 6... | Line 6... | |||
6 | |
6 | |
|
- | 7 | using System; |
||
7 | using System; |
8 | using System.Text; |
|
Line 8... | Line 9... | |||
8 | using System.Threading.Tasks; |
9 | using System.Threading.Tasks; |
|
9 | |
10 | |
|
10 | namespace wasSharp |
11 | namespace wasSharp |
|
Line 28... | Line 29... | |||
28 | combine[i] = (byte)(l[i] ^ r[i]); |
29 | combine[i] = (byte)(l[i] ^ r[i]); |
|
29 | }); |
30 | }); |
|
Line 30... | Line 31... | |||
30 | |
31 | |
|
31 | return new Guid(combine); |
32 | return new Guid(combine); |
|
- | 33 | } |
||
- | 34 | |
||
- | 35 | /// <summary> |
||
- | 36 | /// Converts a byte array to a hexadecimal string. |
||
- | 37 | /// </summary> |
||
- | 38 | /// <param name="bytes"></param> |
||
- | 39 | /// <returns></returns> |
||
- | 40 | public static string ToHexString(this byte[] bytes) |
||
- | 41 | { |
||
- | 42 | StringBuilder str = new StringBuilder(); |
||
- | 43 | |
||
- | 44 | for (int i = 0; i < bytes.Length; i++) |
||
- | 45 | str.AppendFormat("{0:X2}", bytes[i]); |
||
- | 46 | |
||
- | 47 | return str.ToString(); |
||
32 | } |
48 | } |
|
33 | } |
49 | } |