Java 类com.facebook.crypto.keychain.KeyChain 实例源码

项目:secure-preferences    文件:SecurePreferences.java   
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
    );
}
项目:secure-preferences    文件:SecurePreferences.java   
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);
}
项目:secure-preferences    文件:SecurePreferences.java   
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
    );
}
项目:secure-preferences    文件:SecurePreferences.java   
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);
}
项目:react-native-keychain    文件:CipherStorageFacebookConceal.java   
public CipherStorageFacebookConceal(ReactApplicationContext reactContext) {
    KeyChain keyChain = new SharedPrefsBackedKeyChain(reactContext, CryptoConfig.KEY_256);
    this.crypto = AndroidConceal.get().createDefaultCrypto(keyChain);
}