Implementation of Http digest in javascript via node js