Inserting encrypted password into SQL database

Results 1 to 4 of 4

Thread: Inserting encrypted password into SQL database

  1. #1
    Srilatha Guest

    Default Inserting encrypted password into SQL database

    Hi,<BR><BR>I grabbed one of the encrpting/decryptig algorithms&#039 from the articles section and made some modifications to it. The encrypt and decrypt function is working fine.<BR>I inserted this encrypted password into the SQL tables. When I do a checking by retrieving it, the crypted password is not exactly the same as the earlier one.<BR>I am not sure what&#039s wrong with the update of the database.<BR>These are my results -<BR>First I display both the encrypted and decrypted passwords and see whether the actual password is displayed.It works fine<BR><BR>The ecnrypted string is ¯¦©eg* <BR>The decrypted string is abc123<BR><BR>abc123 happens to be my actual string. This was prior to insert into database.<BR>Now I update my database with this crypted password.<BR>When I try to retrieve it later and display it out - following is the result I get -<BR><BR>The crypted password from database table is _¦ceg+ <BR>The decrypted/actual password is b12<BR><BR>As you can see, the actual string is different. I am not sure what&#039s going wrong in the insert portion.<BR><BR>Pls. help,<BR>Thanks,<BR>Srilatha<BR><BR>

  2. #2
    Ugh!! Guest

    Default RE: Inserting encrypted password into SQL database

    Problems seems to be that what you&#039re sticking in the database and what you&#039re pulling back out are 2 different strings. For example, you&#039re putting in a (C) symbol and pulling out a C. YOu can deal with this in one of 2 ways:<BR><BR>1. Modify your Crypt/DCrypt routines to stick to ASCII values between 32 and 127. Like this you&#039ll avoid any transalation/non-standard chars problems. An idea might be to add up the resultant ASCII values of each char and just keep that in your database. This won&#039t enable you to pull back the original password, but when the password is keyed in again you can run the same process and compare results.<BR><BR>2. Find out why the translation is occuring. Are you using SQL Server or Access? Personally, I&#039ve never seen anything which converts a (c) to c in SQL Server. Any ideas anyone ?<BR><BR>Ugh!!<BR>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<BR><BR>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  3. #3
    Srilatha Guest

    Default RE: Inserting encrypted password into SQL database

    Thanks for your help,<BR><BR>I am using Microsoft SQL database, when I modified the crypt and decrypt routines to use ascii values between 32 and 127, there is no difference between the encrypted strings stored in the database and retrieved later. <BR><BR>But I do not understand why there is a translation error if not restricted to values between 32 and 127. Why is the translation failing in this case ? Any ideas

  4. #4
    Ugh!! Guest

    Default RE: Inserting encrypted password into SQL database

    This is a shot in the dark but there&#039s an option when setting up your ODBC connection called: Perform translation for character data. Try flicking it to off, it might be what&#039s causing the problem.<BR><BR>As I said, this is a shot in the dark<BR><BR>tata<BR><BR>Ugh!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts