Skip to content

Commit 5149b5e

Browse files
author
michael kappes
committed
refactor algorithm.const to algorithm.enum in imports
1 parent 44e21c5 commit 5149b5e

6 files changed

+6
-6
lines changed

index.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {secret} from "./index";
2-
import {Algorithm} from "./lib/algorithm.const";
2+
import {Algorithm} from "./lib/algorithm.enum";
33

44
describe("secret", () => {
55
it("should return the initial input when passing encrypt to decrypt", async () => {

index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export {Algorithm} from "./lib/algorithm.const";
1+
export {Algorithm} from "./lib/algorithm.enum";
22
import {decrypt} from "./lib/decrypt.function";
33
import {encrypt} from "./lib/encrypt.function";
44
import {generateKey} from "./lib/generate-key";

lib/generate-key.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Algorithm} from "./algorithm.const";
1+
import {Algorithm} from "./algorithm.enum";
22
import {generateKey, getKeyLength} from "./generate-key";
33

44
describe("getKeyLength", () => {

lib/generate-key.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Algorithm} from "./algorithm.const";
1+
import {Algorithm} from "./algorithm.enum";
22
import {generateRandom} from "./random.function";
33

44
export const getKeyLength = (algorithm: Algorithm): { keyLength: number } => {

lib/get-algorithm.function.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Algorithm} from "./algorithm.const";
1+
import {Algorithm} from "./algorithm.enum";
22
import {getAlgorithm} from "./get-algorithm.function";
33

44
describe("get-algorithm", () => {

lib/get-algorithm.function.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Algorithm} from "./algorithm.const";
1+
import {Algorithm} from "./algorithm.enum";
22

33
export const getAlgorithm = (keyBase64: string): { cipher: string, blockSize: number } => {
44
const key = Buffer.from(keyBase64, "base64");

0 commit comments

Comments
 (0)