Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

myarn/hashed_potato

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hashed potato

Hashed potato is Hash Utility

Example

Hasher in TransformStream

const response = await fetch('URL');
const fileTo = Deno.opne('./example.txt', { create: true, write: true });
const hasher = HashTransformStream = new HashTransformStream('SHA-256')

await response.body!
  .pipeThrough(hasher)
  .pipeTo(fileTo.writable);

hasher.digest('hex') // -> string

Update with ReadableStream

const hasher = new Hasher('SHA-256');
const image = await Deno.open(TESTFILE_PATH, {
  read: true
});

await hasher.updateByReadableStream(image.readable);

hasher.digest('hex'); // -> string

About

Hashed potato is Hash Utility

Resources

License

Stars

Watchers

Forks

Packages

No packages published