prasuna yegurla

Greenhorn
+ Follow
since Aug 12, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by prasuna yegurla

and when i am tring to run this it is giving following exception and i kept the .jasper file in the current folder ...i tried putting ./ before file name also plase help....
14 years ago
14 years ago
[size=12]Hi every one i tried to create message digest created for string and store it into database like this
public static String encrypt(String str) {
StringBuffer encryptedResult = new StringBuffer();
String strWithSalt = salt str;

try {
MessageDigest md = MessageDigest.getInstance(encrptionAlgorithm);
md.update(strWithSalt.getBytes());
byte[] digest = md.digest();

for (byte b : digest) {
int number = b;
// Convert negative numbers
number = (number < 0) ? (number 256) : number;
encryptedResult.append(Integer.toHexString(number));
}

} catch (NoSuchAlgorithmException ex) {
System.out.println(ex.toString());
}

return encryptedResult.toString();
}

please suggest some solution abut which datatype i have to use to store and retrieve this hexadecimal value...