Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: deprecate std/hash #1350

Merged
merged 1 commit into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions hash/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# std/hash is deprecated

`std/hash` is deprecated now. Use Web Crypto API or std/crypto instead.

---

# std/hash

hash is module to provide interfaces for hash functions.
Expand Down
4 changes: 4 additions & 0 deletions hash/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import { Hash } from "./_wasm/hash.ts";
import type { Hasher } from "./hasher.ts";

/** @deprecated */
export type { Hasher } from "./hasher.ts";
/** @deprecated */
export const supportedAlgorithms = [
"md2",
"md4",
Expand All @@ -25,11 +27,13 @@ export const supportedAlgorithms = [
"keccak512",
"blake3",
] as const;
/** @deprecated */
export type SupportedAlgorithm = typeof supportedAlgorithms[number];
/**
* Creates a new `Hash` instance.
*
* @param algorithm name of hash algorithm to use
* @deprecated
*/
export function createHash(algorithm: SupportedAlgorithm): Hasher {
return new Hash(algorithm as string);
Expand Down