summaryrefslogtreecommitdiff
path: root/std/hash/_sha3/shake.ts
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2021-02-02 19:05:46 +0800
committerGitHub <noreply@github.com>2021-02-02 12:05:46 +0100
commit6abf126c2a7a451cded8c6b5e6ddf1b69c84055d (patch)
treefd94c013a19fcb38954844085821ec1601c20e18 /std/hash/_sha3/shake.ts
parenta2b5d44f1aa9d64f448a2a3cc2001272e2f60b98 (diff)
chore: remove std directory (#9361)
This removes the std folder from the tree. Various parts of the tests are pretty tightly dependent on std (47 direct imports and 75 indirect imports, not counting the cli tests that use them as fixtures) so I've added std as a submodule for now.
Diffstat (limited to 'std/hash/_sha3/shake.ts')
-rw-r--r--std/hash/_sha3/shake.ts51
1 files changed, 0 insertions, 51 deletions
diff --git a/std/hash/_sha3/shake.ts b/std/hash/_sha3/shake.ts
deleted file mode 100644
index 4fe24d7cf..000000000
--- a/std/hash/_sha3/shake.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
-
-import { Sponge } from "./sponge.ts";
-import { keccakf } from "./keccakf.ts";
-
-/** Shake128 hash */
-export class Shake128 extends Sponge {
- /**
- * Instantiates a new Shake128 hash
- * @param bitsize length of hash in bits
- */
- constructor(bitsize: number) {
- if (bitsize < 8) {
- throw new Error("shake128: `bitsize` too small");
- }
-
- if (bitsize % 8 !== 0) {
- throw new Error("shake128: `bitsize` must be multiple of 8");
- }
-
- super({
- bitsize: bitsize,
- rate: 168,
- dsbyte: 0x1f,
- permutator: keccakf,
- });
- }
-}
-
-/**
- * Instantiates a new Shake256 hash
- * @param bitsize length of hash in bits
- */
-export class Shake256 extends Sponge {
- constructor(bitsize: number) {
- if (bitsize < 8) {
- throw new Error("shake256: `bitsize` too small");
- }
-
- if (bitsize % 8 !== 0) {
- throw new Error("shake256: `bitsize` must be multiple of 8");
- }
-
- super({
- bitsize: bitsize,
- rate: 136,
- dsbyte: 0x1f,
- permutator: keccakf,
- });
- }
-}