This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:6.11.0 | |
RUN mkdir -p /app | |
WORKDIR /app | |
COPY . /app | |
RUN npm install | |
EXPOSE 3000 80 | |
CMD ["npm", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void decrypt() { | |
if(db.isOpen()) { | |
File unencFile = mContext.getDatabasePath("decrypted.db"); | |
if(!unencFile.exists()) { | |
db.rawExecSQL(String.format("ATTACH DATABASE '%s' as plaintext KEY '';", unencFile.getAbsolutePath())); | |
db.rawExecSQL("SELECT sqlcipher_export('plaintext');"); | |
db.rawExecSQL("DETACH DATABASE plaintext;"); | |
SQLiteDatabase sqlDB = SQLiteDatabase.openOrCreateDatabase(unencFile, null); | |
sqlDB.close(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends AppCompatActivity { | |
private static final String SERVER_PACKAGE = "com.jaeryong.android.aidlserver"; | |
private static final String SERVER_ACTION = "com.jaeryong.android.action.aidlserver"; | |
private IRemoteService mRemoteService; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest package="com.jaeryong.android.aidlserver" | |
xmlns:android="http://schemas.android.com/apk/res/android"> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:supportsRtl="true" | |
android:theme="@style/AppTheme"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ServerService extends Service { | |
@Nullable | |
@Override | |
public IBinder onBind(Intent intent) { | |
return new CalculatorServiceImpl(); | |
} | |
@Override | |
public void onCreate() { | |
super.onCreate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void decrypt() { | |
if(db.isOpen()) { | |
File unencFile = mContext.getDatabasePath("decrypted.db"); | |
if(!unencFile.exists()) { | |
db.rawExecSQL(String.format("ATTACH DATABASE '%s' as plaintext KEY '';", unencFile.getAbsolutePath())); | |
db.rawExecSQL("SELECT sqlcipher_export('plaintext');"); | |
db.rawExecSQL("DETACH DATABASE plaintext;"); | |
android.database.sqlite.SQLiteDatabase sqlDB = android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(unencFile, null); | |
sqlDB.close(); | |
} |