Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2006
    Posts
    3

    Unhappy Unanswered: how to encypt data before i put in the db

    i want to know what function to use to encrypt data before i store it in the database and decrypt the same when i read it.Pls its urgent...can someone help

  2. #2
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    Quote Originally Posted by padmanak
    i want to know what function to use to encrypt data before i store it in the database and decrypt the same when i read it.Pls its urgent...can someone help
    What type of data do you want to encrypt?Is it a password field or something else?
    Success is the ability to go from one failure to another with no loss of enthusiasm.
    - Sir Winston Churchill
    Joydeep

  3. #3
    Join Date
    Sep 2006
    Posts
    3

    how to encypt data before i put in the db

    its an integar field which i want to be encrypted in the database so that anyone who views the database is not able to view unless data is retrieven thru the program.

  4. #4
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    You need to encrypt it before you insert it.

    if you are running on windows, see the methods in System.Security.Cryptography (for managed code) and CryptoAPI for native code.

    http://www.codeproject.com/system/icrypto.asp (example of how to use CryptoAPI in native code)

    http://msdn2.microsoft.com/en-us/library/93bskf9z.aspx (managed code)
    http://msdn2.microsoft.com/en-us/lib...ptography.aspx

  5. #5
    Join Date
    Dec 2002
    Posts
    1,245
    If you are running SQL 2005 (which you probably ought to consider if this is a new application), there are encrypt/decrypt functions built right into the database. It's another option; but CryptoAPI will work as well.

    Regards,

    hmscott
    Have you hugged your backup today?

Posting Permissions

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