feat: change encryption helper

pull/173/head
Firman Ramdhani 2025-07-10 12:51:16 +07:00
parent f76bbcf19d
commit 0b5aeff89d
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)));
}