5/16/14

SHA256 and classic ASP VBSCRIPT for intercom.io secure settings and others

I've recently been using intercom.io to manage my member communication and they require a secure mode to be enabled that passes a hashed value with each session.

On the back end I needed to create javascript that looked like this:


The user hash needed to be a SHA256 hash of the users email address and the unique "salt" or secret key provided by intercom.io on a user account basis.

The problem was that I'm using Vbscript/classic ASP so was having trouble sorting this out with the limited VBScript library.

The solution was found courtesy of:

/*
 * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
 * in FIPS 180-2
 * Version 2.2 Copyright Angel Marin, Paul Johnston 2000 - 2009.
 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
 * Distributed under the BSD License
 * See http://pajhome.org.uk/crypt/md5 for details.
 * Adapted into a WSC for use in classic ASP by Daniel O'Malley
 * (based on an SHA-1 example by Erik Oosterwaal)
 * for use with the Amazon Product Advertising API
 */

Basically you create a stand alone file called sha256.wsc that lives in the same directory as the function - then pass in the appropriate variables.

VBScript Function:

The contents for sha256.wsc follow at the end of the post. Good luck and happy coding

4/21/14

Black Diamond Convert Ski review - spring skiing - corn and mashed potatoes

After looking for a while for a good light weight but still kick ass ski I finally settled on a pair of BD Converts which I mounted with DynaFit bindings. I ride them with BD Factor boots and am 155 pounds 5'10".

Haven't had them in powder yet (all gone here in VT) but I have ridden them in 2" of slush on top of harder snow, and in several inches of corn/mashed potatoes and on some pretty icy hard pack.

So far I'm blown away at how versatile they have been - really easy to turn, stable at speed and super fun to turn. No appreciable chatter on hard pack and good at holding edges. So far my only worry has been how well the dynafit will release/retain as I ride them harder.

They also have a really nice feeling 'swing' weight  - enough weight to feel solid but light enough to make quick jump turns very easy.

5 stars.



3/31/14

La Sportiva Vapor Nano Review

I recently (yesterday) had a chance to demo the Nano at Smugglers' Notch Vermont during the Backcountry Demo days. Conditions were very mixed - with some mashed potatoe style powder, breakable crust, hard pack and bumps. I was using a pair of BD boots w/ a tech binding. I'm 5 10 and 155 pounds. Pretty good skier.


My standard setup is a pair of older Dynastar Legend Pro's with a Marker Duke binding. My immediate reaction to putting the Nano's on was "holy shit, these are light". Not just a little bit lighter, but light like "did these fall off my feet by mistake light". Freaky light is the only way I can put it.

First run was down some well skied main lines and I found the ski to be pretty scary at speed on hard pack. The lightness let the ski get pushed around a bit by bumps and bits of crud and I had to really control my speed to stay happy.

Next run was down a very steep mixed (some packed, some ice and some mush) chute - narrow enough to require jump and fast turns. Here the skis were both amazing and scary. The ease with which I could snap the ski around from one landing zone to the other was incredible. With some practice I think I could probably make a 4' vertical leap with these things on. Make a jump turn or quick chute kick turn was stupid easy and I found myself just jumping over obstacles that I might have side stepped over normally.

Again - the light weight was so incredibly light that I didn't feel terribly secure when work across the fall line on ice and hard pack, but the maneuverability was pretty amazing.

Last run was through a combination of fresh spring 'powder' (think sierra cement) and some breakable crust. Here the flex pattern and weight really came into play - with the tip riding up and over nicely. Tail seems stiff enough so that I could get out of the backseat pretty easily. Excellent float.

My take away was that these would be ridiculous to have on a nice powder day in the back country - really easy to skin up with and sweet through trees and pow. As an inbounds and out of bounds ski they are just too light to be trust worthy (not to mention I'd hate to break a $1,200 pair of skis skiing shit conditions).

For really steep skiing I'd again want to have a little more substance under foot.

-bill