Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

HttpSecureCookie, A Way to Encrypt Cookies with ASP.NET 2.0

, 3 Apr 2006 Ms-PL
Discussing how to encode and tamper-proof text and cookies using the MachineKey, by using reflection.
httpsecurecookie_demo.zip
Bin
AdamTibi.Web.Security.dll
httpsecurecookie_src.zip
Release
AdamTibi.Web.Security.dll
Properties
using System;
using System.Collections.Generic;
using System.Text;

namespace AdamTibi.Web.Security {

    /// <summary>
    /// Represents errors that occur when a text can't be decoded or the text is tampered 
    /// </summary>
    public class InvalidCypherTextException : Exception {
        
        /// <summary>
        /// Constructor
        /// </summary>
        public InvalidCypherTextException() : base() {
        }

        /// <summary>
        /// Constructor
        /// </summary>
        public InvalidCypherTextException(string message) : base(message) {
        }

        /// <summary>
        /// Constructor
        /// </summary>
        public InvalidCypherTextException(string message, Exception innerException) : base(message, innerException) {
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)

Share

About the Author

Adam Tibi
Architect
United Kingdom United Kingdom
Passionate about refining software practices, promoting self-motivated teams and orchestrating agile projects that hit the deadline.
Lives in London, UK and works as a .NET architect consultant in the City.
 
Need a pro service to help your organisation? Contact me via my website www.AdamTibi.net.
Follow on   Twitter

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150327.1 | Last Updated 3 Apr 2006
Article Copyright 2006 by Adam Tibi
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid