Skip to content

Instantly share code, notes, and snippets.

View jdposthuma's full-sized avatar
🎯
Focusing

Jason Posthuma jdposthuma

🎯
Focusing
  • Bruce
  • Paris, France
View GitHub Profile
@marlun78
marlun78 / JavaScriptTimeConverter.cs
Last active January 28, 2023 03:57
C# to/from JavaScript date converter
/**
* C# <> JavaScript Date Converter
* Copyright (c) 2011 marlun78
* MIT License, https://gist.github.com/marlun78/bd0800cf5e8053ba9f83
*/
/// <summary>
/// Provides a Convert method to convert between C# DateTime values and JavaScript parsable Int64 date values.
/// </summary>
public static class JavaScriptDateConverter
{
@jtan189
jtan189 / JavaPasswordSecurity.java
Created September 29, 2012 15:10
Java PBKDF2 Password Hashing Code
import java.security.SecureRandom;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.SecretKeyFactory;
import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
/*
* PBKDF2 salted password hashing.
* Author: havoc AT defuse.ca