Click here to Skip to main content
15,910,009 members
Home / Discussions / Java
   

Java

 
Questionconverting problem from cmyk to rgb image Pin
Shankar nehrumaharajan7-Aug-13 3:21
Shankar nehrumaharajan7-Aug-13 3:21 
Questionhow to draw smooth curve with java? Pin
xiaobai13795-Aug-13 17:32
xiaobai13795-Aug-13 17:32 
SuggestionRe: how to draw smooth curve with java? Pin
Richard MacCutchan5-Aug-13 20:48
mveRichard MacCutchan5-Aug-13 20:48 
Questioni can't pause the song in this code Pin
Member 101909835-Aug-13 8:52
Member 101909835-Aug-13 8:52 
AnswerRe: i can't pause the song in this code Pin
Richard MacCutchan5-Aug-13 20:46
mveRichard MacCutchan5-Aug-13 20:46 
GeneralRe: i can't pause the song in this code Pin
Member 101909836-Aug-13 4:42
Member 101909836-Aug-13 4:42 
GeneralRe: i can't pause the song in this code Pin
Richard MacCutchan6-Aug-13 4:56
mveRichard MacCutchan6-Aug-13 4:56 
QuestionTwo salt Values? Pin
chdboy3-Aug-13 5:14
chdboy3-Aug-13 5:14 
I'm getting two values for my salt

This is my code

Java
private static String getSalt() throws NoSuchAlgorithmException, NoSuchProviderException
{
    SecureRandom sr = SecureRandom.getInstance("SHA1PRNG");
	//SecureRandom sr = new SecureRandom();
    byte[] salt = new byte[8192];
    sr.nextBytes(salt);    
    return salt.toString();
   
}


and when I save it in my database
my code

Java
PS.setString(1, User);		
		PS.setString(2, getSalt());
		PS.executeUpdate();		
		System.out.println(" Salt :"+getSalt());


I get different value..why?

I'm salting String asdf

VB
 Database value [B@2fc396df 
Printed value [B@5199c9ac

AnswerRe: Two salt Values? Pin
jschell3-Aug-13 5:18
jschell3-Aug-13 5:18 
AnswerRe: Two salt Values? Pin
Bernhard Hiller4-Aug-13 22:32
Bernhard Hiller4-Aug-13 22:32 
Questionhow can i solve method RequestProcessor with using thread Pin
Zeff Portal31-Jul-13 15:39
Zeff Portal31-Jul-13 15:39 
AnswerRe: how can i solve method RequestProcessor with using thread Pin
Richard MacCutchan31-Jul-13 21:02
mveRichard MacCutchan31-Jul-13 21:02 
Questionread idmef.xml file Pin
peniya30-Jul-13 5:00
peniya30-Jul-13 5:00 
AnswerRe: read idmef.xml file Pin
Richard MacCutchan30-Jul-13 5:52
mveRichard MacCutchan30-Jul-13 5:52 
GeneralRe: read idmef.xml file Pin
peniya30-Jul-13 5:55
peniya30-Jul-13 5:55 
GeneralRe: read idmef.xml file Pin
Richard MacCutchan30-Jul-13 6:27
mveRichard MacCutchan30-Jul-13 6:27 
Questionread .csv file and write relationship between data Pin
peniya30-Jul-13 4:43
peniya30-Jul-13 4:43 
AnswerRe: read .csv file and write relationship between data Pin
Richard MacCutchan30-Jul-13 5:51
mveRichard MacCutchan30-Jul-13 5:51 
GeneralRe: read .csv file and write relationship between data Pin
peniya30-Jul-13 5:53
peniya30-Jul-13 5:53 
GeneralRe: read .csv file and write relationship between data Pin
Richard MacCutchan30-Jul-13 6:24
mveRichard MacCutchan30-Jul-13 6:24 
Questionselecting numbers that is not between double/single qoutes with regular expression Pin
mohammadkaab29-Jul-13 12:55
mohammadkaab29-Jul-13 12:55 
SuggestionRe: selecting numbers that is not between double/single qoutes with regular expression Pin
Richard MacCutchan29-Jul-13 20:59
mveRichard MacCutchan29-Jul-13 20:59 
QuestionNot able to add my hash password into my database(mssql) Pin
chdboy25-Jul-13 23:11
chdboy25-Jul-13 23:11 
AnswerRe: Not able to add my hash password into my database(mssql) Pin
pa1joc26-Jul-13 2:54
pa1joc26-Jul-13 2:54 
GeneralRe: Not able to add my hash password into my database(mssql) Pin
chdboy26-Jul-13 19:18
chdboy26-Jul-13 19:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.