Skip to content

Instantly share code, notes, and snippets.

View mayurlohite's full-sized avatar

Mayur Lohite mayurlohite

View GitHub Profile
public class CookieHelper
{
#region Constants
/// <summary>
/// The cookie name
/// </summary>
public const string cookieName = "UserName";
#endregion
public class GlobalCommonHelper
{
// This constant string is used as a "salt" value for the PasswordDeriveBytes function calls.
// This size of the IV (in bytes) must = (keysize / 8). Default keysize is 256, so the IV must be
// 32 bytes long. Using a 16 character string here gives us 32 bytes when converted to a byte array.
private const string initVector = "<your salt>";
// This constant is used to determine the keysize of the encryption algorithm.