hash (md5 and sha1 routines for binary Buffer data)

Provides generation of md5 and sha1 checksums

Usage:

var base64=require("base64");

Generating checksums for passwd file:

var hash=require("hash");
var fs=require("fs");

var f1=new fs.File("/etc/passwd");
f1.open("r");
var content=f1.read();
f1.close();

system.stdout.writeLine("md5  value="+hash.md5 (content));
system.stdout.writeLine("sha1 value="+hash.sha1(content));

List of static functions

Name Arguments Returns Description
md5 Buffer String Creates md5 checksum and returns String containing hex-encoded value
sha1 Buffer String Creates sha1 checksum and returns String containing hex-encoded value