.Net Encryption & Decryption Algorithm | Hash | Symmetric | Asymmetric | ....
Encryption & Decryption Algorithm
·
Hash
Hash functions are fundamental to
modern cryptography. These functions map binary strings of an arbitrary length
to small binary strings of a fixed length, known as hash values. A
cryptographic hash function has the property that it is computationally
infeasible to find two distinct inputs that hash to the same value. Hash
functions are commonly used with digital signatures and for data integrity.
·
Symmetric
Symmetric encryption uses a single
key to encrypt and decrypt. Both parties (encryptor and decryptor) must share
the same secret key.
·
Asymmetric
Asymmetric encryption uses a pair
of keys to encrypt and decrypt. There is a “public” key which is used
to encrypt. Decrypting, on the other hand, requires both the “public”
key and an additional “private” key. The advantage is that people can
send you encrypted messages without being able to decrypt them.
Note: The only
provider supported is the “a
href="https://msdn.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider(v=vs.110).aspx"RSACryptoServiceProvider“
·
Data
Data represents Hex, Byte, Base64,
or String data to encrypt/decrypt;
1. Use
the .Text property to set/get a string representation
2. Use
the .Hex property to set/get a string-based Hexadecimal representation
3. Use
the .Base64 to set/get a string-based Base64 representation