Encrypting Data

The .NET runtime offers a complete set of cryptographic services via the System.Security. Cryptography namespace. This namespace allows secure encoding, decoding, hashing, random number generation, and a number of other functionalities.

Two main types of cryptographic algorithms are available in .NET: symmetric and asymmetric. Symmetric algorithms use one secret key to encrypt and decrypt data, whereas asymmetric algorithms use two keys, one private and one public. Asymmetric algorithms are also called public-key algorithms. To create a new public-key algorithm, you need to inherit from AsymmetricAlgorithm. The private key is kept secret by the receiver, and the public key is kept (and made public) by the sender (and encrypter) ...

Get Building e-Commerce Sites with the .NET Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.