aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/Remoting.cs
diff options
context:
space:
mode:
authorlbsa712007-10-30 09:05:31 +0000
committerlbsa712007-10-30 09:05:31 +0000
commit67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch)
tree20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Framework/General/Remoting.cs
parent* Deleted .user file (diff)
downloadopensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz
* Optimized usings
* Shortened type references * Removed redundant 'this' qualifier
Diffstat (limited to 'OpenSim/Framework/General/Remoting.cs')
-rw-r--r--OpenSim/Framework/General/Remoting.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/OpenSim/Framework/General/Remoting.cs b/OpenSim/Framework/General/Remoting.cs
index 330c078..667ae69 100644
--- a/OpenSim/Framework/General/Remoting.cs
+++ b/OpenSim/Framework/General/Remoting.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Framework
41 /// <para>When recieving data from the foreign host - run 'Authenticate' against the data and the attached byte[].</para> 41 /// <para>When recieving data from the foreign host - run 'Authenticate' against the data and the attached byte[].</para>
42 /// <para>Both hosts should be performing these operations for this to be effective.</para> 42 /// <para>Both hosts should be performing these operations for this to be effective.</para>
43 /// </remarks> 43 /// </remarks>
44 class RemoteDigest 44 internal class RemoteDigest
45 { 45 {
46 private byte[] currentHash; 46 private byte[] currentHash;
47 private byte[] secret; 47 private byte[] secret;
@@ -58,7 +58,7 @@ namespace OpenSim.Framework
58 public RemoteDigest(string sharedSecret, byte[] salt, string challenge) 58 public RemoteDigest(string sharedSecret, byte[] salt, string challenge)
59 { 59 {
60 SHA512 = new SHA512Managed(); 60 SHA512 = new SHA512Managed();
61 Rfc2898DeriveBytes RFC2898 = new Rfc2898DeriveBytes(sharedSecret,salt); 61 Rfc2898DeriveBytes RFC2898 = new Rfc2898DeriveBytes(sharedSecret, salt);
62 secret = RFC2898.GetBytes(512); 62 secret = RFC2898.GetBytes(512);
63 ASCIIEncoding ASCII = new ASCIIEncoding(); 63 ASCIIEncoding ASCII = new ASCIIEncoding();
64 64
@@ -108,7 +108,7 @@ namespace OpenSim.Framework
108 byte[] bytes = new byte[64]; 108 byte[] bytes = new byte[64];
109 RNG.GetBytes(bytes); 109 RNG.GetBytes(bytes);
110 110
111 StringBuilder sb = new StringBuilder(bytes.Length * 2); 111 StringBuilder sb = new StringBuilder(bytes.Length*2);
112 foreach (byte b in bytes) 112 foreach (byte b in bytes)
113 { 113 {
114 sb.AppendFormat("{0:x2}", b); 114 sb.AppendFormat("{0:x2}", b);
@@ -130,6 +130,5 @@ namespace OpenSim.Framework
130 Buffer.BlockCopy(b, 0, c, a.Length, b.Length); 130 Buffer.BlockCopy(b, 0, c, a.Length, b.Length);
131 return c; 131 return c;
132 } 132 }
133
134 } 133 }
135} 134} \ No newline at end of file