public ConcealCrypto create(){ if (this.context == null){ throw new RuntimeException("Context cannot be null"); } mEntityPassword = Entity.create(CipherUtils.obscureEncodeSixFourString(mEntityPasswordRaw.getBytes())); makeKeyChain = new SharedPrefsBackedKeyChain(this.context.get(),(mKeyChain==null)?CryptoConfig.KEY_256:mKeyChain); if (mKeyChain == null) { crypto = AndroidConceal.get().createDefaultCrypto(makeKeyChain); } else if (mKeyChain == CryptoConfig.KEY_128) { crypto = AndroidConceal.get().createCrypto128Bits(makeKeyChain); } else { crypto = AndroidConceal.get().createCrypto256Bits(makeKeyChain); } return new ConcealCrypto(this); }
@Before public void setUp() throws Exception { SoLoader.init(InstrumentationRegistry.getContext(), false); final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(InstrumentationRegistry.getContext()); final Crypto crypto = AndroidConceal .get() .createDefaultCrypto(new SharedPrefsBackedKeyChain( InstrumentationRegistry.getContext(), CryptoConfig.KEY_256 )); factory = new ConcealPreferenceFactory(crypto, prefs); }
@Before public void setUp() throws Exception { SoLoader.init(InstrumentationRegistry.getContext(), false); prefs = PreferenceManager.getDefaultSharedPreferences(InstrumentationRegistry.getContext()); crypto = AndroidConceal .get() .createDefaultCrypto(new SharedPrefsBackedKeyChain( InstrumentationRegistry.getContext(), CryptoConfig.KEY_256 )); }
@Before public void setUp() throws Exception { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(InstrumentationRegistry.getContext()); final Crypto crypto = AndroidConceal .get() .createDefaultCrypto(new SharedPrefsBackedKeyChain( InstrumentationRegistry.getContext(), CryptoConfig.KEY_256 )); factory = new ConcealPreferenceFactory(crypto, prefs); }
@Before public void setUp() throws Exception { prefs = PreferenceManager.getDefaultSharedPreferences(InstrumentationRegistry.getContext()); crypto = AndroidConceal .get() .createDefaultCrypto(new SharedPrefsBackedKeyChain( InstrumentationRegistry.getContext(), CryptoConfig.KEY_256 )); }
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 ConcealCrypto(Context context,CryptoConfig config){ keyChain = new SharedPrefsBackedKeyChain(context,config==null?CryptoConfig.KEY_256:config); crypto = AndroidConceal.get().createDefaultCrypto(keyChain); }
@Provides @Singleton com.facebook.crypto.Crypto provideCrypto(@AppContext Context context) { BeeConcealKeyChain keyChain = new BeeConcealKeyChain(context); return AndroidConceal.get().createCrypto256Bits(keyChain); }
public PropertyCrypto(Context context, Gson gson) { BeeConcealKeyChain keyChain = new BeeConcealKeyChain(context); mFbCrypto = AndroidConceal.get().createCrypto256Bits(keyChain); mGson = gson; }
public BeeEncryption(Context context) { BeeConcealKeyChain keyChain = new BeeConcealKeyChain(context); crypto = AndroidConceal.get().createCrypto256Bits(keyChain); }
public CipherStorageFacebookConceal(ReactApplicationContext reactContext) { KeyChain keyChain = new SharedPrefsBackedKeyChain(reactContext, CryptoConfig.KEY_256); this.crypto = AndroidConceal.get().createDefaultCrypto(keyChain); }
public ConcealEncryption(Context context) { SharedPrefsBackedKeyChain keyChain = new SharedPrefsBackedKeyChain(context, CryptoConfig.KEY_256); crypto = AndroidConceal.get().createDefaultCrypto(keyChain); }
@Before public void setup() { Context context = InstrumentationRegistry.getContext(); SharedPrefsBackedKeyChain keyChain = new SharedPrefsBackedKeyChain(context, CryptoConfig.KEY_256); crypto = AndroidConceal.get().createDefaultCrypto(keyChain); }