Skip to content

Instantly share code, notes, and snippets.

View benlesh's full-sized avatar
🐶
☕ 🔥 🔥 this is fine

Ben Lesh benlesh

🐶
☕ 🔥 🔥 this is fine
View GitHub Profile
@benlesh
benlesh / app.js
Created December 7, 2012 15:04
Angular 1.0.3/Jquery 1.8.3/Bootstrap Template
var app = angular.module('myApp', []);
app.controller('MainCtrl', function($scope) {
});
@benlesh
benlesh / Hasher.cs
Created August 22, 2012 19:08
A password hashing utility for .NET and a functional test console application for it.
/// <summary>
/// A hashing utility.
/// </summary>
public static class Hasher
{
/// <summary>
/// Gets an HMAC SHA512 hash for some text.
/// </summary>
/// <param name="text">The text to hash</param>
/// <param name="salt">The salt to use in hashing.</param>
@benlesh
benlesh / Program.cs
Created August 15, 2012 15:09
A basic digitally signed token in C#. More info at: http://www.benlesh.com/2012/08/creating-digitally-signed-security.html
class Program
{
static void Main(string[] args)
{
TokenTesting();
}
private static void TokenTesting()
{
// create a private key to use in our tests.