[Csharp-classlib-cvs] demos/EasyMD5/EasyMD5 AssemblyInfo.cs,NONE,1.1 EasyMD5.prjx,NONE,1.1 Main.cs,N
Status: Inactive
Brought to you by:
generalpd
From: Marcel K. <gen...@us...> - 2005-05-03 20:12:53
|
Update of /cvsroot/csharp-classlib/demos/EasyMD5/EasyMD5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6387/EasyMD5/EasyMD5 Added Files: AssemblyInfo.cs EasyMD5.prjx Main.cs Log Message: - import of EasyMD5 demo --- NEW FILE: EasyMD5.prjx --- <Project name="EasyMD5" standardNamespace="EasyMD5" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#"> <Contents> <File name=".\Main.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> <File name=".\AssemblyInfo.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> <File name=".\Classes" subtype="Directory" buildaction="Compile" dependson="" data="" /> <File name="..\Classes\clsEasyMD5.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> </Contents> <References /> <DeploymentInformation target="" script="" strategy="File" /> <Configuration runwithwarnings="True" name="Debug"> <CodeGeneration runtime="Mono" compiler="Mcs" compilerversion="Standard" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Exe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" /> <Execution commandlineparameters="" consolepause="True" /> <Output directory="..\..\bin\Debug" assembly="EasyMD5" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" /> </Configuration> <Configurations active="Debug"> <Configuration runwithwarnings="True" name="Debug"> <CodeGeneration runtime="Mono" compiler="Mcs" compilerversion="Standard" warninglevel="4" nowarn="" includedebuginformation="True" optimize="False" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Exe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" /> <Execution commandlineparameters="" consolepause="True" /> <Output directory="..\..\bin\Debug" assembly="EasyMD5" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" /> </Configuration> <Configuration runwithwarnings="True" name="Release"> <CodeGeneration runtime="Mono" compiler="Mcs" compilerversion="Standard" warninglevel="4" nowarn="" includedebuginformation="False" optimize="True" unsafecodeallowed="False" generateoverflowchecks="False" mainclass="" target="Exe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" /> <Execution commandlineparameters="" consolepause="True" /> <Output directory="..\..\bin\Release" assembly="EasyMD5" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" /> </Configuration> </Configurations> </Project> --- NEW FILE: Main.cs --- // C# ClassLib (Demos) // http://csharp-classlib.sourceforge.net // // // Copyright (C) 2005 Marcel Joachim Kloubert // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // using System; namespace CSharp_ClassLib.Demos.EasyMD5Class { /*! \brief Main class * * Main class * * \author generalpd * * \version $Revision: 1.1 $ * * \date 2005-05-03 * * \bug none * * \todo none * * \remarks Last changed by: $Author: generalpd $ in revision $Revision: 1.1 $ on $Date: 2005/05/03 20:12:45 $ * * \note * $Log: Main.cs,v $ * Revision 1.1 2005/05/03 20:12:45 generalpd * - import of EasyMD5 demo * * * */ public class MainClass { private CSharp_ClassLib.Cryptography.EasyMD5 m_oMD5; public MainClass() { return; } /*! \fn static int Main(string[] args) * \brief Entry point * * \param args Array of command line arguments * * \return Error code (0 => no error; 1 => Exception) * */ public static int Main(string[] args) { // run the demo return ( new CSharp_ClassLib.Demos.EasyMD5Class.MainClass() ).Run(args); } /*! \fn int Run (string[] args) * \brief Non-Static version of Main() * * \param args Array of command line arguments * * \return Error code (0 => no error; 1 => Exception) * */ private int Run (string[] args) { try { // user's input System.String strInputString = ""; // create new instance this.m_oMD5 = new CSharp_ClassLib.Cryptography.EasyMD5(); // user has to enter a string Console.WriteLine( "Enter a string that you want to hash:" ); Console.Write( "> " ); strInputString = Console.ReadLine(); // hash the string this.m_oMD5.ExpressionString =strInputString; // show # of files and sub-dirs that were found Console.WriteLine( "" ); Console.WriteLine("MD5 hash: " + this.m_oMD5.ChecksumString ); // start cleaning System.GC.Collect(); System.GC.WaitForPendingFinalizers(); return 0; } catch (System.Exception e) { // exception Console.WriteLine("EXCEPTION: " + e.Message); return 1; } } } } --- NEW FILE: AssemblyInfo.cs --- using System.Reflection; using System.Runtime.CompilerServices; // Information about this assembly is defined by the following // attributes. // // change them to the information which is associated with the assembly // you compile. [assembly: AssemblyTitle("")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("")] [assembly: AssemblyCopyright("")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // The assembly version has following format : // // Major.Minor.Build.Revision // // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): [assembly: AssemblyVersion("1.0.*")] // The following attributes specify the key for the sign of your assembly. See the // .NET Framework documentation for more information about signing. // This is not required, if you don't want signing let these attributes like they're. [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] |