25-1/28/1

This commit is contained in:
Hamza-Ayed
2025-01-28 01:03:04 +03:00
parent 46709df1e6
commit 9b0650b118
84 changed files with 416 additions and 830 deletions

View File

@@ -6,7 +6,8 @@ import '../../env/env.dart';
var secretKey = Env.keyOfApp
.toString()
.split('XrXlBl')[0]; // Must be 16 characters for AES-128
const initializationVector = 'abcdefghijklmnop'; // Must be 16 characters
String initializationVector = Env.initializationVector; // Must be 16 characters
final encryptionHelper = EncryptionHelper(
secretKey: secretKey,
initializationVector: initializationVector,

View File

@@ -35,6 +35,17 @@ class AppInitializer {
Future<void> initializeApp() async {
await getKey();
await getAIKey('FCM_PRIVATE_KEY');
}
getAIKey(String key) async {
var res =
await CRUD().get(link: AppLink.getapiKey, payload: {"keyName": key});
if (res != 'failure') {
var d = jsonDecode(res)['message'];
storage.write(key: 'FCM_PRIVATE_KEY', value: d[key].toString());
// return d[key].toString();
} else {}
}
Future<void> getKey() async {