2004-04-05 Bernie Solomon <bernard@ugsolutions.com>
[mono.git] / mcs / class / corlib / System.Security.Cryptography / RIPEMD160.cs
1 //
2 // RIPEMD160.cs: Defines a base class from which all RIPEMD-160 implementations inherit
3 //
4 // Author:
5 //      Pieter Philippaerts (Pieter@mentalis.org)
6 //
7 // (C) 2003 The Mentalis.org Team (http://www.mentalis.org/)
8 //
9
10 #if NET_1_2
11
12 using System;
13
14 namespace System.Security.Cryptography {
15         /// <summary>
16         /// Represents the abstract class from which all implementations of the <see cref="RIPEMD160"/> hash algorithm inherit.
17         /// </summary>
18         public abstract class RIPEMD160 : HashAlgorithm {
19                 /// <summary>
20                 /// Initializes a new instance of <see cref="RIPEMD160"/>.
21                 /// </summary>
22                 protected RIPEMD160 () 
23                 {
24                         this.HashSizeValue = 160;
25                 }
26
27                 /// <summary>
28                 /// Creates an instance of the default implementation of the <see cref="RIPEMD160"/> hash algorithm.
29                 /// </summary>
30                 /// <returns>A new instance of the RIPEMD160 hash algorithm.</returns>
31                 public static new RIPEMD160 Create () 
32                 {
33                         return Create ("System.Security.Cryptography.RIPEMD160");
34                 }
35
36                 /// <summary>
37                 /// Creates an instance of the specified implementation of the <see cref="RIPEMD160"/> hash algorithm.
38                 /// </summary>
39                 /// <param name="hashName">The name of the specific implementation of RIPEMD160 to use.</param>
40                 /// <returns>A new instance of the specified implementation of RIPEMD160.</returns>
41                 public static new RIPEMD160 Create (string hashName) 
42                 {
43                         return (RIPEMD160)CryptoConfig.CreateFromName (hashName);
44                 }
45         }
46 }
47
48 #endif