upd: env pass encrypt

Deskripsi:
- ganti env pass encripsi
- pengaplikasian env

No Issues
This commit is contained in:
2025-08-21 11:35:25 +08:00
parent 6a97ae76fc
commit 4e6b27bbcc
5 changed files with 10 additions and 9 deletions

View File

@@ -1,3 +1,4 @@
import { ConstEnv } from '@/constants/ConstEnv';
import { apiRegisteredToken, apiUnregisteredToken } from '@/lib/api';
import { getToken, requestPermission } from '@/lib/useNotification';
import AsyncStorage from '@react-native-async-storage/async-storage';
@@ -41,13 +42,13 @@ export default function AuthProvider({ children }: { children: ReactNode }): Rea
const decryptToken = (async (token: string) => {
var C = require("crypto-js");
var Decrypted = C.AES.decrypt(token, "your password");
var Decrypted = C.AES.decrypt(token, ConstEnv.pass_encrypt);
var result = Decrypted.toString(C.enc.Utf8);
return result
})
const encryptToken = (async (token: string) => {
var result = CryptoES.AES.encrypt(token, "your password").toString();
var result = CryptoES.AES.encrypt(token, ConstEnv.pass_encrypt).toString();
return result
})