Encryption algorithm Application C # code

Source: Internet
Author: User

1. MD5

Message-digest 5 algorithm, which is a one-way encryption method. The plaintext cannot be deduced from the resulting ciphertext. The obtained ciphertext has a fixed length. in. Net implementations, the length is

Use :

The ciphertext generated by the content of an unlimited length of information can be used as a unique marker symbol for digital signature. If the content of information changes, the resulting ciphertext and the old cipher must not be equal.

You can verify that the file has changed during transmission.

Protect the user's password, save ciphertext to the database, background workers can not see the user's password.

2. RSA

1. The public and private keys are generated by the same RSACryptoServiceProvider instance.

2. Use public key cryptography to decrypt with the private key.

Use:

1. The message can be encrypted with the other party's public key, the recipient once found encrypted information, you can try to use their own private key to decrypt the information, if successful, the information is expected to be checked by the recipient. Otherwise, the information does not want to be seen by you.

3. DES

1. A Key(byte array) is generated by the same DESCryptoServiceProvider instance.

2. Both encryption and decryption are using the same key.

Use:

Credit card consumption data. This data , from POS to bank data systems, needs to go through a public network and therefore needs to be transmitted in ciphertext form. The POS terminal and the bank Data System server side share a key, in the POS side encryption, the server side with the same key decryption, you can see the plaintext form of consumption data.

Encryption algorithm Application C # code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.