Hello Friends,
Many times we face the problem while saving important data to database.This problem can be solve by converting it to encrypted Hash.The program is given below check it out ....
public string Encrypt(string inp)
{
MD5CryptoServiceProvider hasher = new MD5CryptoServiceProvider();
byte[] tBytes = Encoding.ASCII.GetBytes(inp);
byte[] hBytes = hasher.ComputeHash(tBytes);
StringBuilder sb = new StringBuilder();
for (int c = 0; c < hBytes.Length; c++)
sb.AppendFormat("{0:x2}", hBytes[c]);
return (sb.ToString());
}
This is works only for Encryption Decryption is not possible
Friday, October 24, 2008
Encrypting Password to store in Database in C#
Posted by
Rohit Lagu
0
comments
Labels: c#, password Encryption
Monday, June 2, 2008
Operating Systems Market Share
An operating system is the software component of a computer system that is responsible for the management and coordination of activities and the sharing of the resources of the computer. The operating system (OS) acts as a host for application programs that are run on the machine.
some popular os are shown in graph below.
Posted by
Rohit Lagu
0
comments
Wednesday, March 12, 2008
Simple Client
/* this is simple client program in java connecting server 127.0.0.1(localhost) with port no 8000 */
//regular import
import java.net.*;
import java.io.*;
public class client
{
Socket cli;
DataInputStream din;
DataOutputStream dos;
public void start()
{
try
{
cli=new Socket("127.0.0.1",8000);
din=new DataInputStream(cli.getInputStream());
dos=new DataOutputStream(cli.getOutputStream());
dos.writeUTF("hello server...........");
String str=din.readUTF();
System.out.println(str);
cli.close();
}
catch(Exception e)
{
System.out.println(e);
}
}
public static void main(String args[])
{
client c;
c=new client();
c.start();
}
}
Posted by
Rohit Lagu
0
comments