Skip to content

Instantly share code, notes, and snippets.

View blowdart's full-sized avatar
😡
Probably disgusted with your security choices.

Barry Dorrans blowdart

😡
Probably disgusted with your security choices.
View GitHub Profile
@blowdart
blowdart / gist:4035399
Created November 7, 2012 23:39
Hello request in flight body
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)
{
if (request.Headers.Date == null)
{
request.Headers.Date = DateTime.UtcNow;
}
// Check if we have request content, if we do then we need to add a Content-MD5 header.
if (request.Content != null && request.Content.Headers.ContentMD5 == null)
{
@blowdart
blowdart / EncryptionPaddingProblem.cs
Created May 18, 2011 17:20 — forked from follesoe/EncryptionPaddingProblem.cs
Padding problem with AesManaged
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace CryptoTest
{
class Program
{
static void Main(string[] args)