BPSoftware.com
Home   Utilities   Purchase   FAQ   Support   Contact        
Shareware Utilities
 APrintDirect
 AIconExtract
 AFile Attribute Manager
Freeware Utilities
 AddrMon
 AFileSync
 ASysIcon
 B&P Table Utilities
 BPACLer
 BPSNMPMon
 BPSNMPUtil
 CharCount
 Delphi® Components
 MacAddr
Miscellaneous
 BPSoftware Blog
 Purchase Shareware
 Support

 


Saturday, February 03, 2007
Cryptography hash and a class - to go

One of the things I appreciate the most in OOP is the concept of classes. I have found that the use of classes allows for code to be easily maintained and reused. I look at classes as neat little packaged objects that can be ‘moved around’ and ‘worked with’ as their own. Another big benefit of classes is the concept of inheritance and polymorphism. In three previous posts (1, 2, 3) I discussed using the System.Security.Cryptography Namespace to calculate the hash values of text (strings) and files. I actually did create a class (that I actively use) from that sample.


1using System;
2using System.Text;
3using System.Security.Cryptography;
4using System.IO;
5
6 public class CryptoHash
7 {
8 /// <summary>
9 /// public enum hashtypes { MD5, SHA1, SHA256, SHA384, SHA512 };
10 /// </summary>

11 public enum hashtypes { MD5, SHA1, SHA256, SHA384, SHA512 };
12
13 Properties
44
45 Constructors
55
56 Methods
199 }

200
201

Labels: , ,

posted by Brad Prendergast at 5:01:00 PM
Comments:
Links to this post:

Create a Link

Recent Posts
 C# LocalAdapterInformation
 PInvoke WIN32 and .NET
 ASP.NET upload a file HtmlInputFile Control
 PPCTL.DLL is damaged and could not be repaired.
 Google Mobile SMS
 Running a .NET Framework application from a networ...
 I am Green Lantern!
 More Hash - Part II
 More Hash - Part I
 Is it a Hash Brown?


Labels



Archives
 October 2005
 November 2005
 December 2005
 January 2006
 February 2006
 March 2006
 April 2006
 May 2006
 June 2006
 July 2006
 August 2006
 September 2006
 December 2006
 January 2007
 February 2007
 March 2007
 September 2007
 October 2007
 November 2007
 July 2008
 November 2008
Powered by Blogger