Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Password !

Password !

Scheduled Pinned Locked Moved Database
questiondatabase
8 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MohamadJaber
    wrote on last edited by
    #1

    I have a table contain ( username,password ) and I'll save that password encrypted in the database how can I do this ? thanks dadax

    C A R 3 Replies Last reply
    0
    • M MohamadJaber

      I have a table contain ( username,password ) and I'll save that password encrypted in the database how can I do this ? thanks dadax

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Encrypt the password first and then save it in the database like anything else.


      "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871) My: Website | Blog

      M 1 Reply Last reply
      0
      • C Colin Angus Mackay

        Encrypt the password first and then save it in the database like anything else.


        "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871) My: Website | Blog

        M Offline
        M Offline
        MohamadJaber
        wrote on last edited by
        #3

        How can I encrypt it ? ( from SQL ) dadax

        C 1 Reply Last reply
        0
        • M MohamadJaber

          How can I encrypt it ? ( from SQL ) dadax

          C Offline
          C Offline
          Colin Angus Mackay
          wrote on last edited by
          #4

          MohamadJaber wrote:

          How can I encrypt it ? ( from SQL )

          As I already said "Encrypt the password first" then put it in SQL. You cannot encrypt it in SQL without using extended stored procedures in SQL Server 2000 or using CLR stored procedures in SQL Server 2005. Either which way the encryption process does not happen in SQL code.


          "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871) My: Website | Blog

          M 1 Reply Last reply
          0
          • C Colin Angus Mackay

            MohamadJaber wrote:

            How can I encrypt it ? ( from SQL )

            As I already said "Encrypt the password first" then put it in SQL. You cannot encrypt it in SQL without using extended stored procedures in SQL Server 2000 or using CLR stored procedures in SQL Server 2005. Either which way the encryption process does not happen in SQL code.


            "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871) My: Website | Blog

            M Offline
            M Offline
            MohamadJaber
            wrote on last edited by
            #5

            sorry annoyance you but plz can you tell how can I enrypted and decrypted it using CLR stored procedures in SQL Server 2005 thanks anyway for you help dadax

            S 1 Reply Last reply
            0
            • M MohamadJaber

              I have a table contain ( username,password ) and I'll save that password encrypted in the database how can I do this ? thanks dadax

              A Offline
              A Offline
              albCode
              wrote on last edited by
              #6

              Here u got good example how to hash password http://www.c-sharpcorner.com/Code/2003/Feb/HashPassword.asp

              1 Reply Last reply
              0
              • M MohamadJaber

                I have a table contain ( username,password ) and I'll save that password encrypted in the database how can I do this ? thanks dadax

                R Offline
                R Offline
                r stropek
                wrote on last edited by
                #7

                You don't need CLR stored procs to encrypt or decrypt. SQL 2005 has encryption built in. Take a look at my blog at http://www.cubido.at/Blog/tabid/176/EntryID/34/Default.aspx. There you can find an example including a mind map describing SQL 2005 encryption functions. Regards, Rainer. Rainer Stropek Visit my blog at http://www.cubido.at/Blog/tabid/176/BlogID/4/Default.aspx

                1 Reply Last reply
                0
                • M MohamadJaber

                  sorry annoyance you but plz can you tell how can I enrypted and decrypted it using CLR stored procedures in SQL Server 2005 thanks anyway for you help dadax

                  S Offline
                  S Offline
                  Stephan Samuel
                  wrote on last edited by
                  #8

                  You don't want to do that anyway. From a security standpoint, there's practically no value of encrypting passwords on the server if you transmit them over plaintext SQL. Anyone with a packet logger (easy) can get as many passwords as they could by finding an admin password and reading them out of your DB (hard).

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups