wasSharpNET – Diff between revs 10 and 11
?pathlinks?
Rev 10 | Rev 11 | |||
---|---|---|---|---|
Line 20... | Line 20... | |||
20 | public static string ToHex(this System.Security.Cryptography.SHA1 sha1, byte[] data) |
20 | public static string ToHex(this System.Security.Cryptography.SHA1 sha1, byte[] data) |
|
21 | { |
21 | { |
|
22 | return BitConverter.ToString(sha1.ComputeHash(data)).Replace("-", ""); |
22 | return BitConverter.ToString(sha1.ComputeHash(data)).Replace("-", ""); |
|
23 | } |
23 | } |
|
Line 24... | Line -... | |||
24 | |
- | ||
25 | |
24 | |
|
26 | public static string ToHex(this System.Security.Cryptography.SHA1 sha1, string data) |
25 | public static string ToHex(this System.Security.Cryptography.SHA1 sha1, string data) |
|
27 | { |
26 | { |
|
28 | return BitConverter.ToString(sha1.ComputeHash(Encoding.UTF8.GetBytes(data))).Replace("-", ""); |
27 | return BitConverter.ToString(sha1.ComputeHash(Encoding.UTF8.GetBytes(data))).Replace("-", ""); |
|
Line 60... | Line 59... | |||
60 | SHA1OutputStream.Position = 0L; |
59 | SHA1OutputStream.Position = 0L; |
|
61 | await SHA1OutputStream.CopyToAsync(outStream); |
60 | await SHA1OutputStream.CopyToAsync(outStream); |
|
62 | } |
61 | } |
|
63 | } |
62 | } |
|
64 | } |
63 | } |
|
65 | } |
- | ||
66 | |
64 | } |
|
- | 65 | |