Few picks from Youtube of songs sung for "Lord have Mercy"
Friday, February 18, 2011
Tuesday, February 15, 2011
Quote of the day
Quote of the day :
For rebellion is as the sin of witchcraft, and stubbornness is as iniquity and idolatry.
For rebellion is as the sin of witchcraft, and stubbornness is as iniquity and idolatry.
Bible : 1 Samuel
Friday, February 11, 2011
Humorous Quotes for the day
Quotes for today :
- "Better to remain silent and be thought a fool than to speak out and remove all doubt."
- "Early to rise, Early to bed, Makes a man healthy but socially dead."
- The Warner Brothers (Animaniacs)
- Courtesy
Monday, February 7, 2011
Iterator,Set and Encryption Example
import java.security.Provider;
import java.security.Security;
import java.security.MessageDigest;
import java.util.Iterator;
import java.util.Set;
public class cipher1 {
public static void main(String args[]) throws Exception
{
// Get the Provider List
Provider p[]=Security.getProviders();
// First record of Providers
// Get the Keyset
Set v_set=p[0].keySet();
// Get the Iterator to operate upon
Iterator itr=v_set.iterator();
// Key and Value String Variables
String v_key;
String v_value;
while(itr.hasNext())
{
v_key=(String)itr.next();
v_value=p[0].getProperty(v_key);
System.out.println("Key is "+v_key);
System.out.println("Property Value is "+v_value);
}
// Use the key value as input
// Example :
// Key of type Key is MessageDigest.SHA-512
// Name would be DSA (contents after the dot(.)
System.out.println("SHA-1 Encrypted Code "+encrypt("Ajith","SHA-1"));
System.out.println("MD5 Encrypted Code "+encrypt("Ajith","MD5"));
System.out.println("MD5 Encrypted Code "+encrypt("Ajith","MD5"));
System.out.println("MD2 Encrypted Code "+encrypt("Ajith","MD2"));
System.out.println("SHA-256 Encrypted Code "+encrypt("Ajith","SHA-256"));
System.out.println("SHA-512 Encrypted Code "+encrypt("Ajith","SHA-512"));
}
// This function takes String to be encrypted and encryption alogrithm name
// and returns the encrypted byte Array
public static byte[] encrypt(String v_str,String v_alg_name) throws Exception
{
java.security.MessageDigest d=null;
d=java.security.MessageDigest.getInstance(v_alg_name);
d.reset();
System.out.println("Bytes are "+v_str.getBytes());
d.update(v_str.getBytes());
return d.digest();
}
}
import java.security.Security;
import java.security.MessageDigest;
import java.util.Iterator;
import java.util.Set;
public class cipher1 {
public static void main(String args[]) throws Exception
{
// Get the Provider List
Provider p[]=Security.getProviders();
// First record of Providers
// Get the Keyset
Set v_set=p[0].keySet();
// Get the Iterator to operate upon
Iterator itr=v_set.iterator();
// Key and Value String Variables
String v_key;
String v_value;
while(itr.hasNext())
{
v_key=(String)itr.next();
v_value=p[0].getProperty(v_key);
System.out.println("Key is "+v_key);
System.out.println("Property Value is "+v_value);
}
// Use the key value as input
// Example :
// Key of type Key is MessageDigest.SHA-512
// Name would be DSA (contents after the dot(.)
System.out.println("SHA-1 Encrypted Code "+encrypt("Ajith","SHA-1"));
System.out.println("MD5 Encrypted Code "+encrypt("Ajith","MD5"));
System.out.println("MD5 Encrypted Code "+encrypt("Ajith","MD5"));
System.out.println("MD2 Encrypted Code "+encrypt("Ajith","MD2"));
System.out.println("SHA-256 Encrypted Code "+encrypt("Ajith","SHA-256"));
System.out.println("SHA-512 Encrypted Code "+encrypt("Ajith","SHA-512"));
}
// This function takes String to be encrypted and encryption alogrithm name
// and returns the encrypted byte Array
public static byte[] encrypt(String v_str,String v_alg_name) throws Exception
{
java.security.MessageDigest d=null;
d=java.security.MessageDigest.getInstance(v_alg_name);
d.reset();
System.out.println("Bytes are "+v_str.getBytes());
d.update(v_str.getBytes());
return d.digest();
}
}
Humourous Quotes for the Day
My Picks of Quotes for the day :
Don't worry about the world coming to an end today. It is already tomorrow in Australia.
"Man is the only animal that laughs and weeps; for he is the only animal that is struck with the difference between what things are, and what they ought to be."
"Three things can't be hidden: coughing, poverty, and love."
"No man is truly married until he understands every word his wife is NOT saying."
( Well Said )
"It is not uncommon for slight acquaintances to get married, but a couple really have to know each other to get divorced."
( I like this one specially, so true)
Don't worry about the world coming to an end today. It is already tomorrow in Australia.
"Man is the only animal that laughs and weeps; for he is the only animal that is struck with the difference between what things are, and what they ought to be."
"Three things can't be hidden: coughing, poverty, and love."
"No man is truly married until he understands every word his wife is NOT saying."
( Well Said )
"It is not uncommon for slight acquaintances to get married, but a couple really have to know each other to get divorced."
( I like this one specially, so true)
Subscribe to:
Posts (Atom)