0.0.2
Hashed potato is Hash Utility
Repository
Current version released
3 years ago
Dependencies
Versions
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') // -> stringUpdate 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