scrypt algorithm implemented in javascript