feat: change encryption helper #173

Merged
firmanr merged 1 commits from feat/data-trx-schedule into development 2025-07-10 12:51:42 +07:00
1 changed files with 4 additions and 2 deletions

View File

@ -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)));
}