Closed GoogleCodeExporter closed 8 years ago
può capitare perché l'hash andrebbe memorizzato nel database in codifica base
64
/**
* From a base 64 representation, returns the corresponding byte[]
* @param data String The base64 representation
* @return byte[]
* @throws IOException
*/
public static byte[] base64ToByte(String data) throws IOException {
BASE64Decoder decoder = new BASE64Decoder();
return decoder.decodeBuffer(data);
}
/**
* From a byte[] returns a base 64 representation
* @param data byte[]
* @return String
* @throws IOException
*/
public static String byteToBase64(byte[] data){
BASE64Encoder endecoder = new BASE64Encoder();
return endecoder.encode(data);
}
Original comment by belaless...@gmail.com
on 4 Sep 2014 at 3:41
An Error has occurred
Something has gone wrong. We are sorry for the inconvenience.
Error code
E200
Error message
Cannot create the user: unexpected error while accessing the database.
Error details
ERRORE: sequenza di byte non valida per la codifica "UTF8": 0x00 Query: INSERT
INTO Studente (NomeUtente, Email, DataRegistrazione, Password, Salt,
UltimoAccesso, Attivo) VALUES(?, ?, DEFAULT, ?, ?, CURRENT_DATE , TRUE);
Parameters: [afsadfasfdsaf, sadfadsdfs@dssf.it,
-T������?���b���:E��!T4K,��,
-4068237242490044325]
Original comment by belaless...@gmail.com
on 4 Sep 2014 at 5:15
O non è meglio farlo direttamente sul database?
http://www.postgresql.org/docs/9.3/static/pgcrypto.html
Original comment by mr.charl...@gmail.com
on 5 Sep 2014 at 5:53
Provo delicatamente un fix
Original comment by belaless...@gmail.com
on 6 Sep 2014 at 2:56
EFFETTUATO
Original comment by belaless...@gmail.com
on 6 Sep 2014 at 3:45
Original issue reported on code.google.com by
belaless...@gmail.com
on 2 Sep 2014 at 1:18