Skip to content

Commit e0b5934

Browse files
committed
move hasher.js to core
1 parent 4953112 commit e0b5934

File tree

9 files changed

+12
-9
lines changed

9 files changed

+12
-9
lines changed

src/algo/hash/md5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
WordArray
33
} from '../../core/core.js';
4-
import { Hasher } from '../../algo/hash/hasher';
4+
import { Hasher } from '../../core/hasher';
55

66
// Constants table
77
const T = [];

src/algo/hash/ripemd160.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
WordArray
2525
} from '../../core/core.js';
2626

27-
import { Hasher } from '../../algo/hash/hasher';
27+
import { Hasher } from '../../core/hasher';
2828

2929
// Constants table
3030
const _zl = new WordArray([

src/algo/hash/sha1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
WordArray
33
} from '../../core/core.js';
44

5-
import { Hasher } from '../../algo/hash/hasher';
5+
import { Hasher } from '../../core/hasher';
66

77
// Reusable object
88
const W = [];

src/algo/hash/sha256.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
WordArray
33
} from '../../core/core.js';
4-
import { Hasher } from '../../algo/hash/hasher';
4+
import { Hasher } from '../../core/hasher';
55

66
// Initialization and round constants tables
77
const H = [];

src/algo/hash/sha3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
WordArray
33
} from '../../core/core.js';
44
import { X64Word } from '../../core/x64-core.js';
5-
import { Hasher } from '../../algo/hash/hasher';
5+
import { Hasher } from '../../core/hasher';
66

77
// Constants tables
88
const RHO_OFFSETS = [];

src/algo/hash/sha512.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Hasher } from '../../algo/hash/hasher';
1+
import { Hasher } from '../../core/hasher';
22
import {
33
X64Word,
44
X64WordArray

src/algo/hash/hasher.js renamed to src/core/hasher.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {BufferedBlockAlgorithm, Base} from '../../core/core';
2-
import {HMAC} from '../../algo/hmac/hmac';
1+
import {BufferedBlockAlgorithm, Base} from './core';
2+
import {HMAC} from '../algo/hmac/hmac';
33

44

55
/**

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
WordArray,
44
BufferedBlockAlgorithm
55
} from './core/core.js';
6-
import { Hasher } from './algo/hash/hasher';
6+
import { Hasher } from './core/hasher';
77
import {
88
X64Word,
99
X64WordArray

src/mode/mode-cfb.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {
3030
* Cipher Feedback block mode.
3131
*/
3232
export class CFB extends BlockCipherMode {
33+
34+
static Encryptor(){}
35+
3336
}
3437
CFB.Encryptor = class extends CFB {
3538
processBlock(words, offset) {

0 commit comments

Comments
 (0)