Unable to store entirely SHA1 password in DB

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Citt_jr
Posts: 6
Joined: Wed 28 Sep 2011 08:44

Unable to store entirely SHA1 password in DB

Post by Citt_jr » Mon 14 Nov 2011 09:01

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Û

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Post by Pinturiccio » Tue 15 Nov 2011 15:04

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Û

Post Reply