Page 1 of 1

Unable to store entirely SHA1 password in DB

Posted: Mon 14 Nov 2011 09:01
by Citt_jr
Hello,

I'm trying to store a hashed password (with SHA1) in my oracle database.
But this password contains some escape characters : "i²6Ïæ¸‰»\0Û

Posted: Tue 15 Nov 2011 15:04
by Pinturiccio
Try to use next code:

Code: Select all

static void Main(string[] args)
        {
            OracleConnection conn = new OracleConnection("Server = orcl1120; User Id = scott; Password = tiger; 

Home = OraClient11g_home2;");
            OracleCommand comm = new OracleCommand("insert into hash (id, pass) values(1,:pass)", conn);
            conn.Open();
            comm.Parameters.Add("pass", OracleDbType.VarChar, 200, "pass").Value = @"i²6Ïæ¸‰»\0Û