Skip to content

Commit 01d5eec

Browse files
committed
Add default multicode for hash
1 parent d7abc7b commit 01d5eec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hash.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use strict'
22

3-
import { createEntryFromFile } from './utils.ts'
3+
import { createEntryFromFile, multicodes } from './utils.ts'
44

55
// TODO: use https://doc.deno.land/https://deno.land/[email protected]/streams/mod.ts/~/iterateReader instead to read in large files, and then use blake2b[Init,Update,Final] to iteratively calculate the hash
66
// Verify that it returns the same hash as when we use readAll https://doc.deno.land/https://deno.land/[email protected]/streams/mod.ts/~/readAll
77

8-
export async function hash (args: string[], multicode: number, internal = false) {
8+
export async function hash (args: string[], multicode: number = multicodes.RAW, internal = false) {
99
const [filename] = args
1010
if (!filename) {
1111
console.error('please pass in a file')

0 commit comments

Comments
 (0)