generateKey method

Future<bool> generateKey()
override

Implementation

Future<bool> generateKey() async {
  SharedPreferences prefs = await SharedPreferences.getInstance();
  String keyEncrypt = RandomString(32);
  String ivEncrypt = RandomString(16);
  prefs.setString('keyEncrypt', keyEncrypt);
  prefs.setString('ivEncrypt', ivEncrypt);
  return true;
}