Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

column type to save byte array

 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I'm having problems saving and retrieving byte arrays in my logon bean from the database, which is mySQL and sometimes Oracle.
I'm hashing a password and saving it and a salt, both as byte arrays, into varchar fields in the database. When I retrieve them, they have changed.
Should I use a different column data type?
While debugging it, I checked to make sure that at least in Java, if I convert a byte array to a string and back to a byte array again, it remains the same.
Thanks in advance for any help!

Adam
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm still flummoxed by this. Does anybody have any advice please?
I've been looking at blob type fields, but they seem to be totally over the top and use extra resources.
All I want is a field to reliably save the output from my String.toBytes() function.
Thanks
Adam
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic