summaryrefslogtreecommitdiff
path: root/std/hash/hasher.ts
blob: e04cb56ef6f4d3e713dc436a4f4d508e10247742 (plain)
1
2
3
4
5
6
7
8
9
10
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.

export type Message = string | ArrayBuffer;
export type OutputFormat = "hex" | "base64";

export interface Hasher {
  update(data: Message): this;
  digest(): ArrayBuffer;
  toString(format?: OutputFormat): string;
}