Skip to content

Instantly share code, notes, and snippets.

// ------------------------------------------------------------------------------
// <auto-generated>
//Generated by avrogen, version 1.7.7.5
//Changes to this file may cause incorrect behavior and will be lost if code
//is regenerated
// </auto-generated>
// ------------------------------------------------------------------------------
namespace homelync
{
using System;
@Recodify
Recodify / SecuredPassword.cs
Last active January 1, 2016 14:59
A persistence unaware securely hashed password using Rrc2898DeriveBytes. Both the hashed password and the generated salt should be persisted.
public class SecuredPassword
{
private const int saltSize = 256;
private readonly byte[] hash;
private readonly byte[] salt;
public byte[] Hash
{
get { return hash; }
}
@Recodify
Recodify / HttpRequestExtensions.cs
Last active January 1, 2016 14:59
The following extension method on HttpRequest will create a string that can be pasted into fiddler (or used in a curl request) and replayed.
namespace System.Web
{
using System.IO;
/// <summary>
/// Extension methods for HTTP Request.
/// <remarks>
/// See the HTTP 1.1 specification http://www.w3.org/Protocols/rfc2616/rfc2616.html
/// for details of implementation decisions.
/// </remarks>