asp.net 4.0

The .NET CryptoStream class in VB.NET

The CryptoStream wraps an ordinary stream and uses an ICryptoTransform. The CryptoStream have the following key advantages:

– You can use automatic encryption without worrying about the block size required by the algorithm, because the CryptoStream uses buffered access.

– CryptoStream wraps an ordinary .NET stream-derived class and you can …

Learn more

The .NET CryptoStream class in C#

The CryptoStream wraps an ordinary stream and uses an ICryptoTransform. The CryptoStream have the following key advantages:

– You can use automatic encryption without worrying about the block size required by the algorithm, because the CryptoStream uses buffered access.

– CryptoStream wraps an ordinary .NET stream-derived class and you can easily use …

Learn more

The .NET ICryptoTransform interface in VB.NET

The ICryptoTransform interface represents blockwise cryptographic transformation which could be an encryption, ecryption, hashing, Base64 encoding/decoding, or formatting operation.  You can create an ICryptoTransform object for a given algorithm by using the:

– CreateEncryptor() method – if you want to encrypt data.

– CreateDecryptor() method – if you want to encrypt data.

 

The next code …

Learn more

How to use the .NET ICryptoTransform interface in C#

The ICryptoTransform interface represents blockwise cryptographic transformation which could be an encryption, ecryption, hashing, Base64 encoding/decoding, or formatting operation.  You can create an ICryptoTransform object for a given algorithm by using the:

–   CreateEncryptor() method – if you want to encrypt data.

–   CreateDecryptor() method – if you want to encrypt data.

The next code …

Learn more

The .NET abstract encryption classes

The .NET abstract encryption classes provide the following:

1. They define the basic members that encryption implementations need to support.

2. They offer some functionality through the static Create() method, which you can use to indirectly create …

Learn more

The .NET Asymmetric Encryption Algorithms

Asymmetric algorithms are based on mathematical methods that require different keys for encryption and decryption. Usually the key used for encryption is called a public key and you can give it to anyone who wants to send encrypted information to you. The private key is the only key that can be used for decryption. In this case you …

Learn more

The .NET Symmetric Encryption Algorithms

Symmetric algorithms always use the same key for encryption and decryption and they are fast for encryption and ecryption.

The next table lists symmetric algorithms supported by .NET:

 

Abstract Algorithm

Default Implementation

Valid Key Size

Maximum Key Size

DES
DES
DESCryptoServiceProvider
64
64

TripleDES
TripleDES
TripleDESCryptoServiceProvider
128,192
192

RC2
RC2
RC2CryptoServiceProvider
40-128
128

Rijndael
Rijndael
RijndaelManaged
128,192,256
256

 

The strength of the encryption corresponds …

Learn more

The .NET Cryptography Classes

The .NET encryption classes are divided into three layers.

1. The first layer is a set of abstract base classes and these classes represent an encryption task. The next table lists these classes:

 

Class …

Learn more

How to generate cryptographically strong random numbers in VB.NET

You can create strong random number values with the System.Security.Cryptography.RandomNumberGenerator class. You use these random key or salt values when you want to store salted password hashes. A salted password hash is a hash created from a password and a so-called salt where salt is a random value. This guarantees that even if two users select …

Learn more

How to generate cryptographically strong random numbers in C#

You can create strong random number values with the System.Security.Cryptography.RandomNumberGenerator class. You use these random key or salt values when you want to store salted password hashes. A salted password hash is a hash created from a password and a so-called salt where salt is a random value. This guarantees that even if two users select …

Learn more