From 0b5aeff89dba3d292c4357c6facaecd841c8e9c5 Mon Sep 17 00:00:00 2001 From: Firman Ramdhani <33869609+firmanramdhani@users.noreply.github.com> Date: Thu, 10 Jul 2025 12:51:16 +0700 Subject: [PATCH] feat: change encryption helper --- .../data-scheduling/infrastructure/helpers/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/configuration/data-scheduling/infrastructure/helpers/index.ts b/src/modules/configuration/data-scheduling/infrastructure/helpers/index.ts index 9a0049c..abc8f47 100644 --- a/src/modules/configuration/data-scheduling/infrastructure/helpers/index.ts +++ b/src/modules/configuration/data-scheduling/infrastructure/helpers/index.ts @@ -1,7 +1,9 @@ +import { EncryptionHelper } from 'src/modules/transaction/sales-price-formula/domain/helpers/encryption.helper'; + export function encryptionTotal(total: number): string { - return btoa(total.toString()); + return EncryptionHelper.encrypt(btoa(total.toString())); } export function decryptionTotal(total: string): number { - return Number(atob(total)); + return Number(atob(EncryptionHelper.decrypt(total))); }