├── .github └── workflows │ └── android.yml ├── .gitignore ├── .idea ├── .gitignore ├── .name ├── compiler.xml ├── gradle.xml ├── misc.xml └── vcs.xml ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── codevault │ │ └── app │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── ic_launcher-playstore.png │ ├── java │ │ └── com │ │ │ └── codevault │ │ │ └── app │ │ │ └── MainActivity.java │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ ├── button_background.xml │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── values-night │ │ └── themes.xml │ │ ├── values │ │ ├── colors.xml │ │ ├── ic_launcher_background.xml │ │ ├── strings.xml │ │ └── themes.xml │ │ └── xml │ │ ├── backup_rules.xml │ │ └── data_extraction_rules.xml │ └── test │ └── java │ └── com │ └── codevault │ └── app │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.github/workflows/android.yml: -------------------------------------------------------------------------------- 1 | name: Android CI 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v3 16 | - name: set up JDK 11 17 | uses: actions/setup-java@v3 18 | with: 19 | java-version: '11' 20 | distribution: 'temurin' 21 | cache: gradle 22 | 23 | - name: Grant execute permission for gradlew 24 | run: chmod +x gradlew 25 | - name: Build with Gradle 26 | run: ./gradlew build 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | Code Vault -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Alok Sharma 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Code Vault - Android App 2 | 3 | ![GitHub](https://img.shields.io/github/license/alok-2002/Code_Vault_Android_App) 4 | ![GitHub last commit](https://img.shields.io/github/last-commit/alok-2002/Code_Vault_Android_App) 5 | ![GitHub stars](https://img.shields.io/github/stars/alok-2002/Code_Vault_Android_App) 6 | ![GitHub forks](https://img.shields.io/github/forks/alok-2002/Code_Vault_Android_App) 7 | ![GitHub repo size](https://img.shields.io/github/repo-size/alok-2002/Code_Vault_Android_App) 8 | ![GitHub release (latest by date)](https://img.shields.io/github/v/release/alok-2002/Code_Vault_Android_App) 9 | 10 | Code Vault is an Android application developed using Android Studio that provides encryption and decryption of text using the Base64 algorithm and a secret key. 11 | This app allows users to securely store and share sensitive information by encoding it into Base64 format with a secret key. 12 | 13 | 14 | ![Screenshot 2023-06-06 171350](https://github.com/Alok-2002/Code_Vault_Android_App/assets/93814546/4a1c011f-37e2-4e48-935b-10ffb9eaacf7) 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | ## Features 24 | 25 | - Text encryption: Encrypt any text using the Base64 algorithm and a secret key. 26 | - Text decryption: Decrypt Base64-encoded text using the secret key. 27 | - Secure storage: Store encrypted text securely within the app. 28 | - Share encrypted text: Share the encrypted text with others via various communication channels. 29 | - Clean and intuitive user interface. 30 | 31 | ## Installation 32 | 33 | To use the Code Vault app, follow these steps: 34 | 35 | 1. Clone the repository to your local machine: 36 | 37 | ``` 38 | git clone https://github.com/alok-2002/code_vault_android_app.git 39 | ``` 40 | 41 | 2. Open the project in Android Studio. 42 | 43 | 3. Build and run the app on an Android device or emulator. 44 | 45 | ## Usage 46 | 47 | 1. Launch the Code Vault app on your Android device. 48 | 49 | 2. Enter the secret key "1234" in the provided input field. (Note: For security reasons, it is recommended to use a strong and unique secret key.) 50 | 51 | 3. Enter the text you want to encrypt in the provided input field. 52 | 53 | 4. Tap the "Encrypt" button to encrypt the text using the Base64 algorithm and the secret key. 54 | 55 | 5. The encrypted text will be displayed in the output field. 56 | 57 | 6. To decrypt the text, enter the encrypted text in the input field. 58 | 59 | 7. Tap the "Decrypt" button to decrypt the text using the secret key. 60 | 61 | 8. The decrypted text will be displayed in the output field. 62 | 63 | 9. You can store the encrypted text within the app by tapping the "Save" button. 64 | 65 | 10. To share the encrypted text, tap the "Share" button and choose the desired communication channel. 66 | 67 | ## Contributing 68 | 69 | Contributions to the Code Vault app are welcome! If you would like to contribute, please follow these steps: 70 | 71 | 1. Fork the repository. 72 | 73 | 2. Create a new branch for your feature or bug fix. 74 | 75 | 3. Make your changes and commit them. 76 | 77 | 4. Push your changes to your fork. 78 | 79 | 5. Submit a pull request to the main repository. 80 | 81 | Please ensure that your contributions adhere to the coding standards and guidelines used in the project. 82 | 83 | ## License 84 | 85 | The Code Vault app is open-source and released under the [MIT License](LICENSE). 86 | 87 | ## Acknowledgments 88 | 89 | This app was developed with the help of the following resources: 90 | 91 | - Android Studio: The official Integrated Development Environment (IDE) for Android app development. 92 | - Base64 Encoding/Decoding: The Base64 algorithm used for text encryption and decryption. 93 | - Android Documentation: Official documentation and tutorials provided by the Android team. 94 | 95 | ## Contact 96 | 97 | If you have any questions, suggestions, or issues, please contact [Alok Sharma](mailto:sharmaalok02gwl@gmail.com). 98 | 99 | Happy encrypting and decrypting with Code Vault! 100 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | } 4 | 5 | android { 6 | namespace 'com.codevault.app' 7 | compileSdk 33 8 | 9 | defaultConfig { 10 | applicationId "com.codevault.app" 11 | minSdk 19 12 | targetSdk 33 13 | versionCode 1 14 | versionName "1.0" 15 | 16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 17 | } 18 | 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | compileOptions { 26 | sourceCompatibility JavaVersion.VERSION_1_8 27 | targetCompatibility JavaVersion.VERSION_1_8 28 | } 29 | } 30 | 31 | dependencies { 32 | 33 | implementation 'androidx.appcompat:appcompat:1.6.1' 34 | implementation 'com.google.android.material:material:1.5.0' 35 | implementation 'androidx.constraintlayout:constraintlayout:2.1.3' 36 | testImplementation 'junit:junit:4.13.2' 37 | androidTestImplementation 'androidx.test.ext:junit:1.1.5' 38 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' 39 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/androidTest/java/com/codevault/app/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.codevault.app; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | assertEquals("com.codevault.app", appContext.getPackageName()); 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alok-2002/Code_Vault_Android_App/04c07020c8e3f18101b85f00926b2d28d5a82ad2/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /app/src/main/java/com/codevault/app/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.codevault.app; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | 5 | import android.os.Bundle; 6 | import android.view.View; 7 | import android.widget.Button; 8 | import android.widget.EditText; 9 | import android.widget.TextView; 10 | import android.widget.Toast; 11 | import android.util.Base64; 12 | 13 | public class MainActivity extends AppCompatActivity { 14 | 15 | private EditText code; 16 | private EditText text1; 17 | private TextView text2; 18 | 19 | @Override 20 | protected void onCreate(Bundle savedInstanceState) { 21 | super.onCreate(savedInstanceState); 22 | setContentView(R.layout.activity_main); 23 | 24 | code = findViewById(R.id.codeEditText); 25 | text1 = findViewById(R.id.text1EditText); 26 | text2 = findViewById(R.id.text2TextView); 27 | 28 | Button encryptButton = findViewById(R.id.encryptButton); 29 | encryptButton.setOnClickListener(new View.OnClickListener() { 30 | @Override 31 | public void onClick(View v) { 32 | encrypt(); 33 | } 34 | }); 35 | 36 | Button decryptButton = findViewById(R.id.decryptButton); 37 | decryptButton.setOnClickListener(new View.OnClickListener() { 38 | @Override 39 | public void onClick(View v) { 40 | decrypt(); 41 | } 42 | }); 43 | 44 | Button resetButton = findViewById(R.id.resetButton); 45 | resetButton.setOnClickListener(new View.OnClickListener() { 46 | @Override 47 | public void onClick(View v) { 48 | reset(); 49 | } 50 | }); 51 | } 52 | 53 | public void encrypt() { 54 | String password = code.getText().toString(); 55 | if (password.equals("1234")) { 56 | String message = text1.getText().toString(); 57 | byte[] encodeMessage = message.getBytes(); 58 | byte[] base64Bytes = Base64.encode(encodeMessage, Base64.DEFAULT); 59 | String encrypt = new String(base64Bytes); 60 | 61 | text2.setText(encrypt); 62 | 63 | } else if (password.isEmpty()) { 64 | Toast.makeText(this, "Enter The Secret Key", Toast.LENGTH_SHORT).show(); 65 | } else { 66 | Toast.makeText(this, "Invalid Secret Key", Toast.LENGTH_SHORT).show(); 67 | } 68 | } 69 | 70 | public void decrypt() { 71 | String password = code.getText().toString(); 72 | if (password.equals("1234")) { 73 | String message = text1.getText().toString(); 74 | byte[] decodeMessage = message.getBytes(); 75 | byte[] base64Bytes = Base64.decode(decodeMessage, Base64.DEFAULT); 76 | String decrypt = new String(base64Bytes); 77 | 78 | text2.setText(decrypt); 79 | 80 | } else if (password.isEmpty()) { 81 | Toast.makeText(this, "Enter The Secret Key", Toast.LENGTH_SHORT).show(); 82 | } else { 83 | Toast.makeText(this, "Invalid Secret Key", Toast.LENGTH_SHORT).show(); 84 | } 85 | } 86 | 87 | public void reset() { 88 | code.setText(""); 89 | text1.setText(""); 90 | text2.setText(""); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_background.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 24 | 25 | 40 | 41 | 57 | 58 |