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