This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Saving, getting byte[ ]

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.
I have MySQl server.
my database will store the username and his password.
the application will not store the password as a plain text, instead, the application will compute the digest of the password (using MessageDigest class), so the application will save the password as byte[ ] type.
my questions are :
1. what is the type of byte[ ] should be in the database ?
2. to store byte[ ] in the database we use :
resultset.updateBytes(...);
and to retrieve byte[ ] we use :
resultset.getBytes(...);
right ??
thanks ranchers.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John,
1) Take a look at section 8.3.2 of Sun's document about the BINARY type.
2) Yes, your calls are correct.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic