25-1/28/1
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user