Skip to content
/ wfh Public

Web File Hasher - a utility for computing the MD5 hash of files in web browsers

License

Notifications You must be signed in to change notification settings

j-arens/wfh

Repository files navigation

WFH - Web File Hasher

A utility for getting the MD5 hash of files in web browsers. The MD5 hashing is done via WebAssembly, and the utility supports incrementally hashing large files via streaming for memory efficiency.

Requirements

  • Rust >= 1.62
  • Cargo >= 1.62
  • The wasm32-unknown-unknown target must be installed to compile the wfh_wasm crate
  • Node.js >= 16
  • pnpm >= 7

Directories

  • wfh - file hashing library
  • wfh_cf_page - example web page using wfh to hash files
  • wfh_wasm - Rust crate wrapping the md-5 crate, compiled down to WebAssembly

Scripts

From the root:

# Develop the example web page locally
pnpm dev

# Build everything
pnpm build

# Test all packages and crates
pnpm test

# Test Rust crates 
pnpm test:rs

# Test TypeScript packages
pnpm test:ts

# Lint all packages and crates
pnpm lint

# Lint Rust crates
pnpm lint:rs

# Lint TypeScript packages
pnpm lint:ts