2

我在数据库中有一个加密的字符串/数字(由 SQL 服务器加密完成,看起来像“䚶ઙᷤ阹熂”),现在我需要通过 c# 代码解密它。我该如何实现?谁可以帮我这个事?

4

1 回答 1

1

Do not store credit card information in a database. It's a recipe for trouble. Doing so will make you a very attractive target for hackers and, if they are successful in retrieving them, end your business and potentially ruin your life as well as the lives of those whose credit card numbers are stolen.

Also It is possible that storing such an information is illegal but depends upon the laws of you country. Please do check the guidelines.

If still you want to go ahead and do so and you want to store such an information then the just keep to the rule of ENCRYPT ENCRYPT ENCRYPT and never DECRYPT. Its like MD5 (i am not at all that you should just use algorithm like md5 for storing the credit card information) where you don't have an algorithm to decrypt but you can only encrypt the data. You can check the information entered matches the encryted data in the database by first encrypting the string with the same algorithm and then comparing it with the encrypted string in the database. Choose a good algorithm and a good and a secure server.

Be sure to choose an encryption algorithm that is secure and have not been broken yet.

于 2012-07-05T08:48:31.333 回答