Skip to content

Instantly share code, notes, and snippets.

Jesse Ehrenzweig jehrenzweig

Block or report user

Report or block jehrenzweig

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jehrenzweig
jehrenzweig / Enum.TryParse.Fail.cs
Created Sep 11, 2019
Code example that demonstrates a fundamental flaw in Enum.TryParse<T>().
View Enum.TryParse.Fail.cs
// Code example that demonstrates a fundamental flaw in Enum.TryParse<T>().
using System;
using System.Linq;
public class Program
{
public static void Main()
{
var values = new[] {
View ProjectEuler-0003.cs
// Also available as a Gist @ http://csharppad.com/gist/f8301db69cb06a2b871fc0511930f54b
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
namespace ProjectEuler
{
class Program
{
View ProjectEuler-0002.cs
// Also available as a Gist @ http://csharppad.com/gist/b9aed1a7b46d1c951f73e18032f0df84
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
namespace ProjectEuler
{
class Program
{
@jehrenzweig
jehrenzweig / JoseJwt.cs
Created Aug 1, 2016
Jose-Jwt POC - JweAlgorithm.ECDH_ES and JweEncryption.A256GCM
View JoseJwt.cs
using Security.Cryptography;
using System.Security.Cryptography;
using Jose;
namespace JoseJwtTesting
{
public class JoseJwt
{
private static readonly byte[] ESEncryptionKeyPart1 = { 4, 114, 29, 223, 58, 3, 191, 170, 67, 128, 229, 33, 242, 178, 157, 150, 133, 25, 209, 139, 166, 69, 55, 26, 84, 48, 169, 165, 67, 232, 98, 9 };
private static readonly byte[] ESEncryptionKeyPart2 = { 131, 116, 8, 14, 22, 150, 18, 75, 24, 181, 159, 78, 90, 51, 71, 159, 214, 186, 250, 47, 207, 246, 142, 127, 54, 183, 72, 72, 253, 21, 88, 53 };
You can’t perform that action at this time.