Posts

Showing posts from 2014

JAVA Chart

Image
Hi, Today I explain you how to generate graphs report in Java JFreeChart is a free 100% Java chart library created by David Gilbert. JFreeChart makes it easy for developers to display professional quality charts in their applications. To download JFreeChart please check here Add this library to your project I explain here how to generate a Pie chart in java. Create a class called it Java_Test_Graphs package java_test_graphs; /** * * @author mahesh */ public class Java_Test_Graphs { /** * @param args the command line arguments */ public static void main(String[] args) {      // TODO code application logic here      Report_graphs objReport = new Report_graphs();      objReport.setSize(500, 350);      objReport.setVisible(true);      objReport.show();    } } Here Report_graphs is an another java class which is extends by javax.swing.JFrame  see below code package java_test_graphs; import org

JAVA MD5 String Encryption

Hi, Today I explain how to generate MD5 string in Java. The MD5 Message-Digest Algorithm is a widely used cryptographic hash function that produces a 128-bit (16-byte) hash value. MD5 has been employed in a wide variety of security applications, and is also commonly used to check data integrity. MD5 was designed by Ron Rivest in 1991 to replace an earlier hash function, MD4. An MD5 hash is typically expressed as a 32-digit hexadecimal number . Java security package java.security provides certain useful classes to generate Hash values. Especially the class java.security. Message-digest provides applications the functionality of a message digest algorithm, such as MD5 or SHA. This generated String can be save on database for securing the user password. Create a class as follows import java.security.*; public class Test {                                      String val_1="abc",val_2="xyz";                 public static void main(String[] args) {