本文整理汇总了Java中com.facebook.android.crypto.keychain.AndroidConceal类的典型用法代码示例。如果您正苦于以下问题:Java AndroidConceal类的具体用法?Java AndroidConceal怎么用?Java AndroidConceal使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AndroidConceal类属于com.facebook.android.crypto.keychain包,在下文中一共展示了AndroidConceal类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import com.facebook.android.crypto.keychain.AndroidConceal; //导入依赖的package包/类
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);
}
示例2: setUp
import com.facebook.android.crypto.keychain.AndroidConceal; //导入依赖的package包/类
@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);
}
示例3: setUp
import com.facebook.android.crypto.keychain.AndroidConceal; //导入依赖的package包/类
@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
));
}
示例4: setUp
import com.facebook.android.crypto.keychain.AndroidConceal; //导入依赖的package包/类
@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);
}
示例5: setUp
import com.facebook.android.crypto.keychain.AndroidConceal; //导入依赖的package包/类
@Before public void setUp() throws Exception {
prefs = PreferenceManager.getDefaultSharedPreferences(InstrumentationRegistry.getContext());
crypto = AndroidConceal
.get()
.createDefaultCrypto(new SharedPrefsBackedKeyChain(
InstrumentationRegistry.getContext(),
CryptoConfig.KEY_256
));
}
示例6: SecurePreferences
import com.facebook.android.crypto.keychain.AndroidConceal; //导入依赖的package包/类
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);
}
示例7: ConcealCrypto
import com.facebook.android.crypto.keychain.AndroidConceal; //导入依赖的package包/类
public ConcealCrypto(Context context,CryptoConfig config){
keyChain = new SharedPrefsBackedKeyChain(context,config==null?CryptoConfig.KEY_256:config);
crypto = AndroidConceal.get().createDefaultCrypto(keyChain);
}
示例8: provideCrypto
import com.facebook.android.crypto.keychain.AndroidConceal; //导入依赖的package包/类
@Provides
@Singleton
com.facebook.crypto.Crypto provideCrypto(@AppContext Context context) {
BeeConcealKeyChain keyChain = new BeeConcealKeyChain(context);
return AndroidConceal.get().createCrypto256Bits(keyChain);
}
示例9: PropertyCrypto
import com.facebook.android.crypto.keychain.AndroidConceal; //导入依赖的package包/类
public PropertyCrypto(Context context, Gson gson) {
BeeConcealKeyChain keyChain = new BeeConcealKeyChain(context);
mFbCrypto = AndroidConceal.get().createCrypto256Bits(keyChain);
mGson = gson;
}
示例10: BeeEncryption
import com.facebook.android.crypto.keychain.AndroidConceal; //导入依赖的package包/类
public BeeEncryption(Context context) {
BeeConcealKeyChain keyChain = new BeeConcealKeyChain(context);
crypto = AndroidConceal.get().createCrypto256Bits(keyChain);
}
示例11: CipherStorageFacebookConceal
import com.facebook.android.crypto.keychain.AndroidConceal; //导入依赖的package包/类
public CipherStorageFacebookConceal(ReactApplicationContext reactContext) {
KeyChain keyChain = new SharedPrefsBackedKeyChain(reactContext, CryptoConfig.KEY_256);
this.crypto = AndroidConceal.get().createDefaultCrypto(keyChain);
}
示例12: ConcealEncryption
import com.facebook.android.crypto.keychain.AndroidConceal; //导入依赖的package包/类
public ConcealEncryption(Context context) {
SharedPrefsBackedKeyChain keyChain = new SharedPrefsBackedKeyChain(context, CryptoConfig.KEY_256);
crypto = AndroidConceal.get().createDefaultCrypto(keyChain);
}
示例13: setup
import com.facebook.android.crypto.keychain.AndroidConceal; //导入依赖的package包/类
@Before public void setup() {
Context context = InstrumentationRegistry.getContext();
SharedPrefsBackedKeyChain keyChain = new SharedPrefsBackedKeyChain(context, CryptoConfig.KEY_256);
crypto = AndroidConceal.get().createDefaultCrypto(keyChain);
}