For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
| import 'react-native' | |
| export const MockNativeEventEmitter = () => { | |
| return () => { | |
| const EventEmitter = require('EventEmitter') | |
| const RCTDeviceEventEmitter = require('RCTDeviceEventEmitter') | |
| /** | |
| * Mock the NativeEventEmitter as a normal JS EventEmitter. | |
| */ |
| // app module build.gradle | |
| apply plugin: 'com.android.application' | |
| android { | |
| compileSdkVersion rootProject.compileSdkVersion | |
| buildToolsVersion rootProject.buildToolsVersion | |
| defaultConfig { | |
| applicationId "com.segunfamisa.gradleextraproperties" | |
| minSdkVersion rootProject.minSdkVersion | |
| targetSdkVersion rootProject.targetSdkVersion |
| import static android.view.WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD; | |
| import static android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON; | |
| import static android.view.WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON; | |
| public class CustomJUnitRunner extends AndroidJUnitRunner { | |
| @Override public void onCreate(Bundle arguments) { | |
| super.onCreate(arguments); | |
| ActivityLifecycleMonitorRegistry.getInstance().addLifecycleCallback(new ActivityLifecycleCallback() { |
| package productmeister.com.productmeister.view; | |
| import android.annotation.TargetApi; | |
| import android.os.Build; | |
| import android.support.design.widget.AppBarLayout; | |
| import android.support.v4.view.ViewCompat; | |
| import android.support.v7.app.ActionBar; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.support.v7.widget.Toolbar; |
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="your.package.name" > | |
| <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
| <uses-permission android:name="android.permission.INTERNET" /> | |
| <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | |
| <application | |
| android:allowBackup="true" |
| (function() { | |
| var TIMEOUT = 300; | |
| var platform = { | |
| Android: function() { | |
| return navigator.userAgent.match(/Android/i); | |
| }, | |
| BlackBerry: function() { | |
| return navigator.userAgent.match(/BlackBerry/i); | |
| }, | |
| iOS: function() { |
| package com.eatfirst.android.ui.custom; | |
| /** | |
| * Copyright 2015 Bartosz Lipinski | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| <?xml version="1.0" encoding="utf-8"?><!-- | |
| ~ Copyright (C) 2015 The Android Open Source Project | |
| ~ | |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); | |
| ~ you may not use this file except in compliance with the License. | |
| ~ You may obtain a copy of the License at | |
| ~ | |
| ~ http://www.apache.org/licenses/LICENSE-2.0 | |
| ~ | |
| ~ Unless required by applicable law or agreed to in writing, software |