472,353 Members | 2,103 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

How to encrypt and decrypt passwords in a database

Any one help me how to encrypt and decrypt passwords.And the password field is in database(mysql database) how to encrypt and decrypt that password saved in database.
Aug 20 '09 #1
4 3194
8,658 Expert Mod 8TB
if you need password protection (like save a pw in a db non-human-readable) go for the pws hash value (hash()) using a decend method (sha256, ripemd, ). for encryption/decryption using keys try the OpenSSL or Mcrypt functions.
Aug 20 '09 #2
Dheeraj Joshi
1,123 Expert 1GB
And do not forget to do salting.

Dheeraj Joshi
Aug 20 '09 #3
6,050 Expert 4TB
Check out MySQL's aggregate (en|de)crypt functions.
Aug 20 '09 #4
If you use .NET for your application try to use Bonnie.NET at http://www.we-coffee.com/bonnie.aspx. It's a free dll that manages all cryptographic need.

To protect your password, probably the best choice is to use hash functions. If someone stoles your password an hash cannot be rever to the initial value. An attacker could try a sort of brute force attack not directly with the passwords use to discovery your password but hashing them first, making the hash not safe. To avoid this problem try to use keyed hash function (for example HMACSHA1). Bonnie.NET let you to do so.
Sep 26 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

by: wqhdebian | last post by:
As far as I know,when encrypt or decrypt ,a key must first be got,and the key is first generate by a tool or from SecurityRandom,that means I can...
by: msnews.microsoft.com | last post by:
How can I encrypt and decrypt string?
by: Drebin | last post by:
It's a long story really, but the bottom line is we need to encrypt or obfuscate a clear-text 9-digit SSN/taxpayer ID into something less than 21...
by: Alex Nitulescu | last post by:
Hi. I am writing an app which stores usernames/passwords and email addresses in a database table. The question is how can I encrypt the password...
by: Daniel | last post by:
Hi All, Does anyone know how to encrypt the password before store in the sql database? In addition, decrypt the password from database before...
by: Microsoft | last post by:
Hi I'm not able to find a newsgroup for classic asp so I'm writing here hoping someone can help me So, I have to encrypt and also decrypt some...
by: toupeira23 | last post by:
Hello, I'm trying to encrypt passwords in my app. After discovering that there's no simple function to do this, I wrote a wrapper class which...
by: JDeats | last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting and decrypting a file. http://support.microsoft.com/kb/307010 In .NET 2.0...
by: Gilles Ganault | last post by:
Hello I'd like to encrypt a customer's organization name to use this as their password to launch our application, and decrypt it within our VB5...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.