Browse Source

Added slashdocs.

drieseng 9 years ago
parent
commit
037e58270f

+ 6 - 0
src/Renci.SshNet/Common/SshData.cs

@@ -16,6 +16,12 @@ namespace Renci.SshNet.Common
 
 
         private SshDataStream _stream;
         private SshDataStream _stream;
 
 
+        /// <summary>
+        /// Gets the underlying <see cref="SshDataStream"/> that is used for reading and writing SSH data.
+        /// </summary>
+        /// <value>
+        /// The underlying <see cref="SshDataStream"/> that is used for reading and writing SSH data.
+        /// </value>
         protected SshDataStream DataStream
         protected SshDataStream DataStream
         {
         {
             get { return _stream; }
             get { return _stream; }

+ 13 - 0
src/Renci.SshNet/Common/SshDataStream.cs

@@ -5,13 +5,26 @@ using System.Text;
 
 
 namespace Renci.SshNet.Common
 namespace Renci.SshNet.Common
 {
 {
+    /// <summary>
+    /// Specialized <see cref="MemoryStream"/> for reading and writing data SSH data.
+    /// </summary>
     public class SshDataStream : MemoryStream
     public class SshDataStream : MemoryStream
     {
     {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="SshDataStream"/> class with an expandable capacity initialized
+        /// as specified.
+        /// </summary>
+        /// <param name="capacity">The initial size of the internal array in bytes.</param>
         public SshDataStream(int capacity)
         public SshDataStream(int capacity)
             : base(capacity)
             : base(capacity)
         {
         {
         }
         }
 
 
+        /// <summary>
+        /// Initializes a new non-resizable instance of the <see cref="SshDataStream"/> class based on the specified byte array.
+        /// </summary>
+        /// <param name="buffer">The array of unsigned bytes from which to create the current stream.</param>
+        /// <exception cref="ArgumentNullException"><paramref name="buffer"/> is <c>null.</c></exception>
         public SshDataStream(byte[] buffer)
         public SshDataStream(byte[] buffer)
             : base(buffer)
             : base(buffer)
         {
         {

+ 23 - 2
src/Renci.SshNet/Security/Cryptography/HMACMD5.cs

@@ -1,33 +1,54 @@
 #if FEATURE_HMAC_MD5
 #if FEATURE_HMAC_MD5
 
 
-using Renci.SshNet.Common;
+using System.Security.Cryptography;
 
 
 namespace Renci.SshNet.Security.Cryptography
 namespace Renci.SshNet.Security.Cryptography
 {
 {
     /// <summary>
     /// <summary>
-    /// Computes a Hash-based Message Authentication Code (HMAC) by using the MD5 hash function.
+    /// Computes a Hash-based Message Authentication Code (HMAC) by using the <see cref="MD5"/> hash function.
     /// </summary>
     /// </summary>
     public class HMACMD5 : System.Security.Cryptography.HMACMD5
     public class HMACMD5 : System.Security.Cryptography.HMACMD5
     {
     {
         private readonly int _hashSize;
         private readonly int _hashSize;
 
 
+        /// <summary>
+        /// Initializes a <see cref="HMACMD5"/> with the specified key.
+        /// </summary>
+        /// <param name="key">The key.</param>
         public HMACMD5(byte[] key)
         public HMACMD5(byte[] key)
             : base(key)
             : base(key)
         {
         {
             _hashSize = base.HashSize;
             _hashSize = base.HashSize;
         }
         }
 
 
+        /// <summary>
+        /// Initializes a <see cref="HMACSHA1"/> with the specified key and size of the computed hash code.
+        /// </summary>
+        /// <param name="key">The key.</param>
+        /// <param name="hashSize">The size, in bits, of the computed hash code.</param>
         public HMACMD5(byte[] key, int hashSize)
         public HMACMD5(byte[] key, int hashSize)
             : base(key)
             : base(key)
         {
         {
             _hashSize = hashSize;
             _hashSize = hashSize;
         }
         }
 
 
+        /// <summary>
+        /// Gets the size, in bits, of the computed hash code.
+        /// </summary>
+        /// <value>
+        /// The size, in bits, of the computed hash code.
+        /// </value>
         public override int HashSize
         public override int HashSize
         {
         {
             get { return _hashSize; }
             get { return _hashSize; }
         }
         }
 
 
+        /// <summary>
+        /// Finalizes the hash computation after the last data is processed by the cryptographic stream object.
+        /// </summary>
+        /// <returns>
+        /// The computed hash code.
+        /// </returns>
         protected override byte[] HashFinal()
         protected override byte[] HashFinal()
         {
         {
             var hash = base.HashFinal();
             var hash = base.HashFinal();

+ 25 - 1
src/Renci.SshNet/Security/Cryptography/HMACSHA1.cs

@@ -1,30 +1,54 @@
 #if FEATURE_HMAC_SHA1
 #if FEATURE_HMAC_SHA1
 
 
-using Renci.SshNet.Common;
+using System.Security.Cryptography;
 
 
 namespace Renci.SshNet.Security.Cryptography
 namespace Renci.SshNet.Security.Cryptography
 {
 {
+    /// <summary>
+    /// Computes a Hash-based Message Authentication Code (HMAC) by using the <see cref="SHA1"/> hash function.
+    /// </summary>
     public class HMACSHA1 : System.Security.Cryptography.HMACSHA1
     public class HMACSHA1 : System.Security.Cryptography.HMACSHA1
     {
     {
         private readonly int _hashSize;
         private readonly int _hashSize;
 
 
+        /// <summary>
+        /// Initializes a <see cref="HMACSHA1"/> with the specified key.
+        /// </summary>
+        /// <param name="key">The key.</param>
         public HMACSHA1(byte[] key)
         public HMACSHA1(byte[] key)
             : base(key)
             : base(key)
         {
         {
             _hashSize = base.HashSize;
             _hashSize = base.HashSize;
         }
         }
 
 
+        /// <summary>
+        /// Initializes a <see cref="HMACSHA1"/> with the specified key and size of the computed hash code.
+        /// </summary>
+        /// <param name="key">The key.</param>
+        /// <param name="hashSize">The size, in bits, of the computed hash code.</param>
         public HMACSHA1(byte[] key, int hashSize)
         public HMACSHA1(byte[] key, int hashSize)
             : base(key)
             : base(key)
         {
         {
             _hashSize = hashSize;
             _hashSize = hashSize;
         }
         }
 
 
+        /// <summary>
+        /// Gets the size, in bits, of the computed hash code.
+        /// </summary>
+        /// <value>
+        /// The size, in bits, of the computed hash code.
+        /// </value>
         public override int HashSize
         public override int HashSize
         {
         {
             get { return _hashSize; }
             get { return _hashSize; }
         }
         }
 
 
+        /// <summary>
+        /// Finalizes the hash computation after the last data is processed by the cryptographic stream object.
+        /// </summary>
+        /// <returns>
+        /// The computed hash code.
+        /// </returns>
         protected override byte[] HashFinal()
         protected override byte[] HashFinal()
         {
         {
             var hash = base.HashFinal();
             var hash = base.HashFinal();

+ 26 - 1
src/Renci.SshNet/Security/Cryptography/HMACSHA256.cs

@@ -1,30 +1,55 @@
 #if FEATURE_HMAC_SHA256
 #if FEATURE_HMAC_SHA256
 
 
-using Renci.SshNet.Common;
+using System.Security.Cryptography;
 
 
 namespace Renci.SshNet.Security.Cryptography
 namespace Renci.SshNet.Security.Cryptography
 {
 {
+    /// <summary>
+    /// Computes a Hash-based Message Authentication Code (HMAC) by using the <see cref="SHA256"/> hash function.
+    /// </summary>
     public class HMACSHA256 : System.Security.Cryptography.HMACSHA256
     public class HMACSHA256 : System.Security.Cryptography.HMACSHA256
     {
     {
         private readonly int _hashSize;
         private readonly int _hashSize;
 
 
+        /// <summary>
+        /// Initializes a <see cref="HMACSHA256"/> with the specified key.
+        /// </summary>
+        /// <param name="key">The key.</param>
         public HMACSHA256(byte[] key)
         public HMACSHA256(byte[] key)
             : base(key)
             : base(key)
         {
         {
             _hashSize = base.HashSize;
             _hashSize = base.HashSize;
         }
         }
 
 
+        /// <summary>
+        /// Initializes a <see cref="HMACSHA256"/> with the specified key and size of the computed hash code.
+        /// </summary>
+        /// <param name="key">The key.</param>
+        /// <param name="hashSize">The size, in bits, of the computed hash code.</param>
         public HMACSHA256(byte[] key, int hashSize)
         public HMACSHA256(byte[] key, int hashSize)
             : base(key)
             : base(key)
         {
         {
             _hashSize = hashSize;
             _hashSize = hashSize;
         }
         }
 
 
+        /// <summary>
+        /// Gets the size, in bits, of the computed hash code.
+        /// </summary>
+        /// <value>
+        /// The size, in bits, of the computed hash code.
+        /// </value>
         public override int HashSize
         public override int HashSize
         {
         {
             get { return _hashSize; }
             get { return _hashSize; }
         }
         }
 
 
+        /// <summary>
+        /// Finalizes the hash computation after the last data is processed by the cryptographic stream object.
+        /// </summary>
+        /// <returns>
+        /// The computed hash code.
+        /// </returns>
+
         protected override byte[] HashFinal()
         protected override byte[] HashFinal()
         {
         {
             var hash = base.HashFinal();
             var hash = base.HashFinal();

+ 25 - 1
src/Renci.SshNet/Security/Cryptography/HMACSHA384.cs

@@ -1,30 +1,54 @@
 #if FEATURE_HMAC_SHA384
 #if FEATURE_HMAC_SHA384
 
 
-using Renci.SshNet.Common;
+using System.Security.Cryptography;
 
 
 namespace Renci.SshNet.Security.Cryptography
 namespace Renci.SshNet.Security.Cryptography
 {
 {
+    /// <summary>
+    /// Computes a Hash-based Message Authentication Code (HMAC) by using the <see cref="SHA384"/> hash function.
+    /// </summary>
     public class HMACSHA384 : System.Security.Cryptography.HMACSHA384
     public class HMACSHA384 : System.Security.Cryptography.HMACSHA384
     {
     {
         private readonly int _hashSize;
         private readonly int _hashSize;
 
 
+        /// <summary>
+        /// Initializes a <see cref="HMACSHA384"/> with the specified key.
+        /// </summary>
+        /// <param name="key">The key.</param>
         public HMACSHA384(byte[] key)
         public HMACSHA384(byte[] key)
             : base(key)
             : base(key)
         {
         {
             _hashSize = base.HashSize;
             _hashSize = base.HashSize;
         }
         }
 
 
+        /// <summary>
+        /// Initializes a <see cref="HMACSHA384"/> with the specified key and size of the computed hash code.
+        /// </summary>
+        /// <param name="key">The key.</param>
+        /// <param name="hashSize">The size, in bits, of the computed hash code.</param>
         public HMACSHA384(byte[] key, int hashSize)
         public HMACSHA384(byte[] key, int hashSize)
             : base(key)
             : base(key)
         {
         {
             _hashSize = hashSize;
             _hashSize = hashSize;
         }
         }
 
 
+        /// <summary>
+        /// Gets the size, in bits, of the computed hash code.
+        /// </summary>
+        /// <value>
+        /// The size, in bits, of the computed hash code.
+        /// </value>
         public override int HashSize
         public override int HashSize
         {
         {
             get { return _hashSize; }
             get { return _hashSize; }
         }
         }
 
 
+        /// <summary>
+        /// Finalizes the hash computation after the last data is processed by the cryptographic stream object.
+        /// </summary>
+        /// <returns>
+        /// The computed hash code.
+        /// </returns>
         protected override byte[] HashFinal()
         protected override byte[] HashFinal()
         {
         {
             var hash = base.HashFinal();
             var hash = base.HashFinal();

+ 25 - 1
src/Renci.SshNet/Security/Cryptography/HMACSHA512.cs

@@ -1,30 +1,54 @@
 #if FEATURE_HMAC_SHA512
 #if FEATURE_HMAC_SHA512
 
 
-using Renci.SshNet.Common;
+using System.Security.Cryptography;
 
 
 namespace Renci.SshNet.Security.Cryptography
 namespace Renci.SshNet.Security.Cryptography
 {
 {
+    /// <summary>
+    /// Computes a Hash-based Message Authentication Code (HMAC) by using the <see cref="SHA512"/> hash function.
+    /// </summary>
     public class HMACSHA512 : System.Security.Cryptography.HMACSHA512
     public class HMACSHA512 : System.Security.Cryptography.HMACSHA512
     {
     {
         private readonly int _hashSize;
         private readonly int _hashSize;
 
 
+        /// <summary>
+        /// Initializes a <see cref="HMACSHA512"/> with the specified key.
+        /// </summary>
+        /// <param name="key">The key.</param>
         public HMACSHA512(byte[] key)
         public HMACSHA512(byte[] key)
             : base(key)
             : base(key)
         {
         {
             _hashSize = base.HashSize;
             _hashSize = base.HashSize;
         }
         }
 
 
+        /// <summary>
+        /// Initializes a <see cref="HMACSHA512"/> with the specified key and size of the computed hash code.
+        /// </summary>
+        /// <param name="key">The key.</param>
+        /// <param name="hashSize">The size, in bits, of the computed hash code.</param>
         public HMACSHA512(byte[] key, int hashSize)
         public HMACSHA512(byte[] key, int hashSize)
             : base(key)
             : base(key)
         {
         {
             _hashSize = hashSize;
             _hashSize = hashSize;
         }
         }
 
 
+        /// <summary>
+        /// Gets the size, in bits, of the computed hash code.
+        /// </summary>
+        /// <value>
+        /// The size, in bits, of the computed hash code.
+        /// </value>
         public override int HashSize
         public override int HashSize
         {
         {
             get { return _hashSize; }
             get { return _hashSize; }
         }
         }
 
 
+        /// <summary>
+        /// Finalizes the hash computation after the last data is processed by the cryptographic stream object.
+        /// </summary>
+        /// <returns>
+        /// The computed hash code.
+        /// </returns>
         protected override byte[] HashFinal()
         protected override byte[] HashFinal()
         {
         {
             var hash = base.HashFinal();
             var hash = base.HashFinal();