change sha1 lib to support arraybuffer