public SharedPreferences build() { if(!isInit) { Log.w(TAG, "You need call 'SecurePreferences.init()' in onCreate() from your application class."); } KeyChain keyChain = new SharedPrefsBackedKeyChain(context, CryptoConfig.KEY_256); Entity entity = Entity.create( TextUtils.isEmpty(password) ? getClass().getPackage().getName() : password ); return new SecurePreferences( context, keyChain, entity, sharedPrefFilename ); }
private SecurePreferences(Context context, final KeyChain keyChain, final Entity entity, final String sharedPrefFilename) { this.entity = entity; this.sharedPreferences = getSharedPreferenceFile(context, sharedPrefFilename); this.crypto = AndroidConceal.get().createCrypto256Bits(keyChain); }
public CipherStorageFacebookConceal(ReactApplicationContext reactContext) { KeyChain keyChain = new SharedPrefsBackedKeyChain(reactContext, CryptoConfig.KEY_256); this.crypto = AndroidConceal.get().createDefaultCrypto(keyChain); }