jackytck / sha1-file-web

https://jackytck.github.io/sha1-file-web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sha1sum for web file object

Install

yarn add sha1-file-web

Usage

import sha1 from 'sha1-file-web'

// Input: file is the File object:
// https://developer.mozilla.org/en-US/docs/Web/API/File
// Output: string of sha1 hash
async function test (file) {
  const hash = await sha1(file)
  console.log('hash:', hash)
}

About

https://jackytck.github.io/sha1-file-web

License:MIT License


Languages

Language:JavaScript 86.2%Language:HTML 13.8%