encrypted static method
Returns an EncryptedFileStorage instance backed by the platform's application support directory. Values are encrypted with AES-256-GCM.
Pass directory to override the resolved path — useful in unit tests:
final dir = Directory.systemTemp.createTempSync('test_');
final secure = await JustStorage.encrypted(dir);
Implementation
static Future<JustSecureStorage> encrypted([Directory? directory]) async {
final dir = directory ?? await getApplicationSupportDirectory();
return EncryptedFileStorage(dir);
}