diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..273fff0 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "maven" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" diff --git a/.github/ic.png b/.github/ic.png new file mode 100644 index 0000000..dc7f147 Binary files /dev/null and b/.github/ic.png differ diff --git a/.github/im1.png b/.github/im1.png new file mode 100644 index 0000000..48298c7 Binary files /dev/null and b/.github/im1.png differ diff --git a/.github/im2.png b/.github/im2.png new file mode 100644 index 0000000..f99978a Binary files /dev/null and b/.github/im2.png differ diff --git a/.github/im3.png b/.github/im3.png new file mode 100644 index 0000000..632eb88 Binary files /dev/null and b/.github/im3.png differ diff --git a/.github/im4.png b/.github/im4.png new file mode 100644 index 0000000..5fee082 Binary files /dev/null and b/.github/im4.png differ diff --git a/.github/mvvm.png b/.github/mvvm.png new file mode 100644 index 0000000..8480136 Binary files /dev/null and b/.github/mvvm.png differ diff --git a/content/Capture.PNG b/.github/version1.png similarity index 100% rename from content/Capture.PNG rename to .github/version1.png diff --git a/content/2m.png b/.github/version2.png similarity index 100% rename from content/2m.png rename to .github/version2.png diff --git a/content/1.png b/.github/version3.png similarity index 100% rename from content/1.png rename to .github/version3.png diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5555625 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: build + +on: + push: + branches: + - "master" + paths: + - 'src/**' + - '.github/**' + - 'pom.xml' + pull_request: + branches: + - "master" + paths: + - 'src/**' + - '.github/**' + - 'pom.xml' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: Build with Maven + run: mvn -B package --file pom.xml \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2aa2215 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Create Release + +on: + push: + tags: + - 'v*.*.*' + branches: + - "master" + +jobs: + release: + if: github.event_name == 'push' && contains(github.ref, 'refs/heads/master') && startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Extract version + run: echo "VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: | + target/jfxcrypto-${{ env.VERSION }}.jar + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index f63a24e..e23809d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,33 @@ -.idea +# Java +.mtj.tmp/ +*.class +*.jar +*.war +*.ear +*.nar +hs_err_pid* +replay_pid* + +# Intellij Idea +out/ +.idea/ +.idea_modules/ *.iml -out +*.ipr +*.iws + +# Maven +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +pom.xml.bak +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties +.mvn/wrapper/maven-wrapper.jar + +# OS X +.DS_Store \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..b3f953d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,6 @@ +Please try to create bug reports that are: + +- Reproducible. Include steps to reproduce the problem. +- Specific. Include as much detail as possible: which version, what environment, etc. +- Unique. Do not duplicate existing opened issues. +- Scoped to a Single Bug. One bug per report. diff --git a/LICENSE b/LICENSE index 3a7cce9..f49a4e1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,201 @@ -MIT License - -Copyright (c) 2019 MasterFlomaster1 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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 + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/README.md b/README.md index 0d3bc9f..36a6eed 100644 --- a/README.md +++ b/README.md @@ -1,93 +1,81 @@

- +

-

SimpleJavaCrypter

+

JFXCrypto

+[![build](https://github.com/MasterFlomaster1/JFXCrypto/actions/workflows/build.yml/badge.svg)](https://github.com/MasterFlomaster1/JFXCrypto/actions/workflows/build.yml) +![GitHub License](https://img.shields.io/github/license/MasterFlomaster1/JFXCrypto) +![GitHub Release](https://img.shields.io/github/v/release/MasterFlomaster1/JFXCrypto) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/c1a1ccff4a10407c98c03bf7fbf0fa14)](https://app.codacy.com/gh/MasterFlomaster1/JFXCrypto/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) -

Simple tool with JavaFX GUI that can handle following tasks: file and text encryption/decryption, hash sum calculation and file checksum verifier, text encoding. Supports AES128, AES256, DES, 3DES, MD2, MD5, SHA1, SHA224, SHA256, SHA384, SHA512.

+### Description -## Description +JFXCrypto is a flexible cryptographic tool designed to handle a wide range of encryption tasks. Featuring modern GUI, it supports over 150 encryption algorithms, spanning from ancient Greek ciphers to modern algorithms adopted by the US military and NSA. -SimpleJavaCrypter is a program written in java which combines a number of useful functions: encryption/decryption of text and files with various algorithms, file and text hashsum calculation and file checksum verifier. There are several encryption algorithms available right now: AES128, AES256, DES, 3DES and SimpleCipher. The last one is a simple experimental encryption algorithm that can handle encryption and decryption of the text. Only English language is currently supported. Encryption is performed by an elementary algorithm which randomly changes chars in the given text. Text decryption is done by reverse algorithm. This encryption algorithm is currently under development and would need further work. List of all currently supported algorithms you can see below. +### Features -## Features +- Utilize hundreds of available encryption algorithms through the [Bouncy Castle](https://www.bouncycastle.org/download/bouncy-castle-java/) library. See full list below. +- Rich toolkit for encrypting text or files with support for variable key lengths, modes (ECB, CBC, CFB, OFB), various paddings (PKCS5Padding, PKCS7Padding, ISO10126Padding), and integration of salts and IVs for enhanced security. +- Supports importing and exporting keys to PEM files using X509 and PKCS8 standards. +- Generate hashes for text and files, and utilize HMAC (Hash-based Message Authentication Code) for data integrity verification. +- Includes a collection of classic ciphers and ciphers from World Wars (See full list below) +- Modern graphical interface powered by [atlantafx](https://github.com/mkpaz/atlantafx) library with support for multiple themes, animations, and icons, enhanced with an [MVVM](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel) architecture. +- Asynchronous operations, leveraging NIO 2 for efficient file handling and processing. +- Specialized password generation tool based on PBKDF2 for modern and secure password hashing. +- Password complexity and strength analysis using the [zxcvbn4j](https://github.com/nulab/zxcvbn4j) library. +- Utilizes the [Have I Been Pwned](https://haveibeenpwned.com/Passwords) API with [k-anonymity model](https://en.wikipedia.org/wiki/K-anonymity) to check if the password has been exposed in data breaches. -* Text encryption/decryption. -* File encryption/decryption. -* Generate random keys and secret combinations. -* Get current key. -* Encrypt/decrypt text and files with your own key. -* Simple, nice and adjustable JavaFX GUI. -* Text hash calculation. -* File hash calculation. -* File checksum verifier. -* GUI drag and drop is supported. -* Dark theme. +### Usage -## Supported encryption algorithms +1. Download the latest release JAR file +2. ```bash + java --module-path path/to/javafx-sdk/lib --add-modules javafx.controls,javafx.fxml -jar jfxcrypto-.jar -* AES128 -* AES256 -* DES -* 3DES -* RSA -* Caesar +The build requires JDK 17 or later. -## Supported hashing algorithms +### MVVM Architecture -* MD2 -* MD5 -* SHA1 -* SHA224 -* SHA256 -* SHA384 -* SHA512 +![MVVM Diagram](.github/mvvm.png) -## Screenshots +The MVVM (Model-View-ViewModel) architecture separates the user interface (View) from the business logic and data (Model) by using a ViewModel. Using data bindings and event handling, it improves code organization and makes faster reactive GUI. -Application home page +### Block Cipher modes of Operation -![SimpleJavaCrypter](https://raw.githubusercontent.com/MasterFlomaster1/SimpleJavaCrypter/master/content/1.png) +#### CBC (Cipher Block Chaining) +Cipher Block Chaining (CBC) links each plaintext block with the previous ciphertext block using XOR before encryption, enhancing security by ensuring identical plaintext blocks yield different ciphertext blocks. Pros: High security due to chaining; protects against pattern recognition. Cons: Requires an IV; sequential processing limits parallelism. -File encryption +#### ECB (Electronic Codebook) +Electronic Codebook (ECB) encrypts each plaintext block independently with the same key. Pros: Simple implementation; allows parallel processing of blocks. Cons: Low security; identical plaintext blocks produce identical ciphertext, making it vulnerable to pattern analysis. -![SimpleJavaCrypter](https://raw.githubusercontent.com/MasterFlomaster1/SimpleJavaCrypter/master/content/2.png) +#### CFB (Cipher Feedback) +Cipher Feedback (CFB) turns a block cipher into a stream cipher, encrypting small plaintext segments. Pros: Suitable for streaming data; no need for padding. Cons: Requires an IV; sequential processing prevents parallel encryption. -File hash +#### OFB (Output Feedback) +Output Feedback (OFB) mode converts a block cipher into a synchronous stream cipher by encrypting an IV and XORing the result with plaintext. Pros: Error propagation is limited to the corresponding ciphertext segment; suitable for streaming. Cons: Requires an IV; vulnerable to known plaintext attacks if the same IV is reused. -![SimpleJavaCrypter](https://raw.githubusercontent.com/MasterFlomaster1/SimpleJavaCrypter/master/content/4.png) +#### CTR (Counter) +Counter (CTR) mode encrypts a counter value for each block and XORs it with plaintext, allowing blocks to be processed independently. Pros: Enables parallel encryption; no need for padding. Cons: Requires a unique counter for each block to ensure security. -File hash verifier +### Supported algorithms +| Type | Algorithms | +|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Classical Cryptography | ADFGVX, Atbash, Affine, Caesar, Enigma, Playfair, Vigenere | +| Block Ciphers | AES, BLOWFISH, CAMELLIA, CAST5, CAST6, DES, DESEDE, DSTU7624, GOST28147, GOST3412-2015, IDEA, NOEKEON, RC2, RC5, RC6, RIJNDAEL, SEED, SHACAL-2, SKIPJACK, SM4, Serpent, TEA, Threefish-1024, Threefish-256, Threefish-512, Tnepres, Twofish, XTEA | +| Stream Ciphers | ARC4, CHACHA, CHACHA20-POLY1305, CHACHA7539, Grain128, Grainv1, HC128, HC256, SALSA20, XSALSA20, ZUC-128, ZUC-256, VMPC, VMPC-KSA3 | +| Asymmetric Ciphers | DHIES, ECIES, ECIESwithSHA1, ECIESwithSHA256, ECIESwithSHA384, ECIESwithSHA512, ELGAMAL, IES, RSA | +| Digests | BLAKE2B-160, BLAKE2B-256, BLAKE2B-384, BLAKE2B-512, BLAKE2S-128, BLAKE2S-160, BLAKE2S-224, BLAKE2S-256, BLAKE3-256, DSTU7564-256, DSTU7564-384, DSTU7564-512, GOST3411, GOST3411-2012-256, GOST3411-2012-512, HARAKA-256, HARAKA-512, KECCAK-224, KECCAK-256, KECCAK-288, KECCAK-384, KECCAK-512, MD2, MD4, MD5, PARALLELHASH128-256, PARALLELHASH256-512, RIPEMD128, RIPEMD160, RIPEMD256, RIPEMD320, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256, SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128-256, SHAKE256-512, SM3, Skein-1024-1024, Skein-1024-384, Skein-1024-512, Skein-256-128, Skein-256-160, Skein-256-224, Skein-256-256, Skein-512-128, Skein-512-160, Skein-512-224, Skein-512-256, Skein-512-384, Skein-512-512, TIGER, TUPLEHASH128-256, TUPLEHASH256-512, WHIRLPOOL | +| HMAC | HMACDSTU7564-256, HMACDSTU7564-384, HMACDSTU7564-512, HMACGOST3411, HMACGOST3411-2012-256, HMACGOST3411-2012-512, HMACKECCAK224, HMACKECCAK256, HMACKECCAK288, HMACKECCAK384, HMACKECCAK512, HMACMD2, HMACMD4, HMACMD5, HMACRIPEMD128, HMACRIPEMD160, HMACRIPEMD256, HMACRIPEMD320, HMACSHA1, HMACSHA224, HMACSHA256, HMACSHA3-224, HMACSHA3-256, HMACSHA3-384, HMACSHA3-512, HMACSHA384, HMACSHA512, HMACSHA512/224, HMACSHA512/256, HMACSM3, HMACSkein-1024-1024, HMACSkein-1024-384, HMACSkein-1024-512, HMACSkein-256-128, HMACSkein-256-160, HMACSkein-256-224, HMACSkein-256-256, HMACSkein-512-128, HMACSkein-512-160, HMACSkein-512-224, HMACSkein-512-256, HMACSkein-512-384, HMACSkein-512-512, HMACTIGER, HMACWHIRLPOOL | +| PBKDF2 | PBKDF2, PBKDF2WITHASCII, PBKDF2WITHHMACGOST3411, PBKDF2WITHHMACSHA224, PBKDF2WITHHMACSHA256, PBKDF2WITHHMACSHA3-224, PBKDF2WITHHMACSHA3-256, PBKDF2WITHHMACSHA3-384, PBKDF2WITHHMACSHA3-512, PBKDF2WITHHMACSHA384, PBKDF2WITHHMACSHA512, PBKDF2WITHHMACSM3 | -![SimpleJavaCrypter](https://raw.githubusercontent.com/MasterFlomaster1/SimpleJavaCrypter/master/content/5.png) +### Screenshots -Text hash +![JFXCrypto](https://raw.githubusercontent.com/MasterFlomaster1/JFXCrypto/master/.github/im1.png) -![SimpleJavaCrypter](https://raw.githubusercontent.com/MasterFlomaster1/SimpleJavaCrypter/master/content/6.png) +![JFXCrypto](https://raw.githubusercontent.com/MasterFlomaster1/JFXCrypto/master/.github/im2.png) -Text encryption +![JFXCrypto](https://raw.githubusercontent.com/MasterFlomaster1/JFXCrypto/master/.github/im3.png) -![SimpleJavaCrypter](https://raw.githubusercontent.com/MasterFlomaster1/SimpleJavaCrypter/master/content/7.png) - -## Usage - - - -## TODO - -1) ~~Simplify and improve existing GUI solution, to make it more pretty looking.~~ -2) Add more encryption algorithms to work with. -3) ~~Add file encryption/decryption option.~~ -4) Finish SimpleCipher algorithm. -5) ~~Add hash calculator function.~~ -6) ~~Add file hash checking function.~~ -7) ~~Add css.~~ -8) Add multithreading. -9) Add more hashing algorithms. - -## Requirements - -Java 8 and above. +![JFXCrypto](https://raw.githubusercontent.com/MasterFlomaster1/JFXCrypto/master/.github/im4.png) ## Contributing and support diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..034e848 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 5.1.x | :white_check_mark: | +| 5.0.x | :x: | +| 4.0.x | :white_check_mark: | +| < 4.0 | :x: | + +## Reporting a Vulnerability + +Use this section to tell people how to report a vulnerability. + +Tell them where to go, how often they can expect to get an update on a +reported vulnerability, what to expect if the vulnerability is accepted or +declined, etc. diff --git a/SimpleJavaCrypter.jar b/SimpleJavaCrypter.jar deleted file mode 100644 index d860911..0000000 Binary files a/SimpleJavaCrypter.jar and /dev/null differ diff --git a/checkstyle.xml b/checkstyle.xml new file mode 100644 index 0000000..4b4ec10 --- /dev/null +++ b/checkstyle.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/content/1m.png b/content/1m.png deleted file mode 100644 index 57e5aa0..0000000 Binary files a/content/1m.png and /dev/null differ diff --git a/content/2.png b/content/2.png deleted file mode 100644 index 52133cb..0000000 Binary files a/content/2.png and /dev/null differ diff --git a/content/3m.png b/content/3m.png deleted file mode 100644 index e22c8ac..0000000 Binary files a/content/3m.png and /dev/null differ diff --git a/content/4.png b/content/4.png deleted file mode 100644 index 2170f9e..0000000 Binary files a/content/4.png and /dev/null differ diff --git a/content/5.png b/content/5.png deleted file mode 100644 index 035aa76..0000000 Binary files a/content/5.png and /dev/null differ diff --git a/content/6.png b/content/6.png deleted file mode 100644 index d1d4626..0000000 Binary files a/content/6.png and /dev/null differ diff --git a/content/7.png b/content/7.png deleted file mode 100644 index 900576a..0000000 Binary files a/content/7.png and /dev/null differ diff --git a/content/SJC8.png b/content/SJC8.png deleted file mode 100644 index bca02cc..0000000 Binary files a/content/SJC8.png and /dev/null differ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..425b09d --- /dev/null +++ b/pom.xml @@ -0,0 +1,327 @@ + + + 4.0.0 + + dev.masterflomaster1 + jfxcrypto + 4.2.1 + + JFXCrypto + Encryption tool + https://github.com/MasterFlomaster1/JFXCrypto + + + + Apache License 2.0 + https://raw.githubusercontent.com/MasterFlomaster1/JFXCrypto/master/LICENSE + repo + + + + + + MasterFlomaster1 + MasterFlomaster1 + + + + + 17 + 17 + UTF-8 + + 17 + 19 + 0.0.8 + 1.54.4 + + JFXCrypto + 4.0.0 + dev.masterflomaster1.jfxc.Start + + ${project.build.directory}${file.separator}dependencies + ${project.build.directory}${file.separator}platform-modules + + + + + org.openjfx + javafx-controls + 22.0.2 + + + org.openjfx + javafx-fxml + 22.0.2 + + + io.github.mkpaz + atlantafx-base + 2.0.1 + + + org.junit.jupiter + junit-jupiter-api + 5.11.0 + test + + + org.bouncycastle + bcprov-jdk18on + 1.78.1 + + + org.kordamp.ikonli + ikonli-javafx + 12.3.1 + + + org.kordamp.ikonli + ikonli-feather-pack + 12.3.1 + + + org.kordamp.ikonli + ikonli-material2-pack + 12.3.1 + + + org.kordamp.ikonli + ikonli-bootstrapicons-pack + 12.3.1 + + + org.openjfx + javafx-web + 22.0.2 + + + org.openjfx + javafx-swing + 22.0.2 + + + + org.jetbrains + annotations + 24.1.0 + + + + fr.brouillard.oss + cssfx + 11.5.1 + + + + com.nulab-inc + zxcvbn + 1.9.0 + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.7.1 + + + us.hebi.sass + sass-cli-maven-plugin + 1.0.3 + + 1.54.5 + + + + org.apache.maven.plugins + maven-shade-plugin + 3.6.0 + + + + + + + + src/main/resources + false + + + src/main/resources + true + + application.properties + + + + + src/package-scripts + true + ${build.package.scriptsDir} + + + + + + + us.hebi.sass + sass-cli-maven-plugin + + + + ${project.basedir}/src/main/resources/assets/styles/scss/index.scss:${project.build.directory}/classes/assets/styles/index.css + + --no-source-map + + + + + run-sass + generate-resources + + run + + + + + + org.openjfx + javafx-maven-plugin + 0.0.8 + + ${java.home}/bin/java + ${app.launcher} + + + + run + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + copy-dependencies + prepare-package + + copy-dependencies + + + ${build.dependenciesDir} + runtime + org.openjfx + + + + + copy-openjfx + prepare-package + + copy-dependencies + + + ${build.platformModulesDir} + org.openjfx + + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + package + + shade + + + + + ${app.launcher} + + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + + + + + + dev + + + + org.openjfx + javafx-maven-plugin + + + + + + + + + + + windows-active + + + windows + + + + win + + + + release + + false + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.1 + + + attach-source + compile + + jar-no-fork + + + + + + + + + + \ No newline at end of file diff --git a/src/Cipher/Aes128.java b/src/Cipher/Aes128.java deleted file mode 100644 index 5760bd9..0000000 --- a/src/Cipher/Aes128.java +++ /dev/null @@ -1,170 +0,0 @@ -package Cipher; - -import GUI.Main.AlertDialog; -import Utils.RepairString; - -import javax.crypto.*; -import javax.crypto.spec.IvParameterSpec; -import javax.crypto.spec.SecretKeySpec; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.security.InvalidAlgorithmParameterException; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; -import java.util.Base64; - -class Aes128 { - - private SecretKey key; - private Cipher cipher; - private IvParameterSpec ivParameterSpec; - - Aes128() { - try { - cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); - } catch (NoSuchAlgorithmException | NoSuchPaddingException e) { - e.printStackTrace(); - } - generateIV(); - generateKey(); - } - - String encryptString(String text) { - try { - cipher.init(Cipher.ENCRYPT_MODE, key, ivParameterSpec); - return Base64.getEncoder().encodeToString(cipher.doFinal(text.getBytes(StandardCharsets.UTF_8))); - } catch (InvalidKeyException | IllegalBlockSizeException | BadPaddingException | InvalidAlgorithmParameterException e) { - e.printStackTrace(); - AlertDialog.showError("AES-128 text encryption error", e.toString()); - return null; - } - } - - String decryptString(String encryptedText) { - byte[] data; - try { - data = Base64.getDecoder().decode(encryptedText.getBytes(StandardCharsets.UTF_8)); - } catch (IllegalArgumentException e) { - System.out.println("IllegalArgumentException caught"); - data = Base64.getDecoder().decode(RepairString.repairString(encryptedText).getBytes(StandardCharsets.UTF_8)); - } - try { - cipher.init(Cipher.DECRYPT_MODE, key, ivParameterSpec); - return new String(cipher.doFinal(data), StandardCharsets.UTF_8); - } catch (InvalidKeyException | IllegalBlockSizeException | BadPaddingException | InvalidAlgorithmParameterException e) { - e.printStackTrace(); - AlertDialog.showError("Error occurred while decrypting text", e.toString()); - return null; - } - } - - void encryptFile(File in, File out) { - try { - cipher.init(Cipher.ENCRYPT_MODE, key, ivParameterSpec); - } catch (InvalidKeyException | InvalidAlgorithmParameterException e) { - e.printStackTrace(); - AlertDialog.showError("AES-128 init error!", e.toString()); - return; - } - byte[] iv = cipher.getIV(); - byte[] buffer = new byte[2048]; - try { - FileOutputStream fileOut = new FileOutputStream(out); - FileInputStream fileIn = new FileInputStream(in); - CipherOutputStream cipherOut = new CipherOutputStream(fileOut, cipher); - fileOut.write(iv); - while (fileIn.read(buffer, 0, buffer.length)!=-1) { - cipherOut.write(buffer, 0, buffer.length); - } - fileIn.close(); - fileOut.close(); - cipherOut.close(); - AlertDialog.showInfo("File was successfully encrypted!"); - } catch (IOException e) { - e.printStackTrace(); - AlertDialog.showError("AES-128 file encryption error!", e.toString()); - } - } - - void decryptFile(File in, File out) { - IvParameterSpec parameterSpec; - try { - byte[] iv = new byte[16]; - FileInputStream temp = new FileInputStream(in); - temp.read(iv); - parameterSpec = new IvParameterSpec(iv); - } catch (IOException e) { - e.printStackTrace(); - return; - } - - try { - cipher.init(Cipher.DECRYPT_MODE, key, parameterSpec); - } catch (InvalidKeyException e) { - e.printStackTrace(); - AlertDialog.showError("AES-128 file decryption error!", e.toString()); - return; - } catch (InvalidAlgorithmParameterException e) { - e.printStackTrace(); - return; - //perform file decryption without initialization vector - } - byte[] buffer = new byte[2048]; - try { - FileOutputStream fileOut = new FileOutputStream(out); - FileInputStream fileIn = new FileInputStream(in); - CipherOutputStream cipherOut = new CipherOutputStream(fileOut, cipher); - while (fileIn.read(buffer, 0, buffer.length)!=-1) { - cipherOut.write(buffer, 0, buffer.length); - } - fileIn.close(); - fileOut.close(); - cipherOut.close(); - AlertDialog.showInfo("File was successfully decrypted!"); - } catch (IOException e) { - e.printStackTrace(); - AlertDialog.showError("AES-128 file decryption error!", e.toString()); - } - } - - void generateKey() { - try { - KeyGenerator generator = KeyGenerator.getInstance("AES"); - generator.init(128); - key = generator.generateKey(); - System.out.println("AES-128 key generated"); - } catch (NoSuchAlgorithmException e) { - e.printStackTrace(); - } - } - - private void generateIV() { - SecureRandom secureRandom = new SecureRandom(); - byte[] iv = new byte[16]; - secureRandom.nextBytes(iv); - ivParameterSpec = new IvParameterSpec(iv); - } - - void setKey(String stringKey) { - key = new SecretKeySpec(stringKey.getBytes(), "AES"); - System.out.println("AES-128 key set"); - } - - void setKeyBase64(String keyBase64) { - key = new SecretKeySpec(Base64.getDecoder().decode(keyBase64), "AES"); - System.out.println("AES-128 key set"); - } - - String getKey() { - return Base64.getEncoder().encodeToString(key.getEncoded()); - } - - private boolean checkKey(String inputKey) { - return true; - } - -} diff --git a/src/Cipher/Aes256.java b/src/Cipher/Aes256.java deleted file mode 100644 index 0de8466..0000000 --- a/src/Cipher/Aes256.java +++ /dev/null @@ -1,201 +0,0 @@ -package Cipher; - -import GUI.Main.AlertDialog; -import Utils.RepairString; - -import javax.crypto.*; -import javax.crypto.spec.IvParameterSpec; -import javax.crypto.spec.SecretKeySpec; -import java.io.*; -import java.nio.charset.StandardCharsets; -import java.security.*; -import java.util.Arrays; -import java.util.Base64; - -class Aes256 { - - private SecretKeySpec key; - private Cipher cipher; - private IvParameterSpec ivParameterSpec; - private final int BLOCK_SIZE = 1024; - - Aes256() { - try { - cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); - } catch (NoSuchAlgorithmException | NoSuchPaddingException e) { - e.printStackTrace(); - } - generateIV(); - generateKey(); - } - - String encryptString(String text) { - try { - cipher.init(Cipher.ENCRYPT_MODE, key, ivParameterSpec); - return Base64.getEncoder().encodeToString(cipher.doFinal(text.getBytes(StandardCharsets.UTF_8))); - } catch (InvalidKeyException | IllegalBlockSizeException | BadPaddingException | InvalidAlgorithmParameterException e) { - e.printStackTrace(); - AlertDialog.showError("AES-256 text encryption error", e.toString()); - return null; - } - } - - String decryptString(String encryptedText) { - byte[] data; - try { - data = Base64.getDecoder().decode(encryptedText.getBytes(StandardCharsets.UTF_8)); - } catch (IllegalArgumentException e) { - System.out.println("IllegalArgumentException caught"); - try { - data = Base64.getDecoder().decode(RepairString.repairString(encryptedText).getBytes(StandardCharsets.UTF_8)); - } catch (IllegalArgumentException ex) { - AlertDialog.showError("Can't decode Base64"); - ex.printStackTrace(); - return null; - } - } - try { - cipher.init(Cipher.DECRYPT_MODE, key, ivParameterSpec); - return new String(cipher.doFinal(data), StandardCharsets.UTF_8); - } catch (InvalidKeyException | IllegalBlockSizeException | BadPaddingException | InvalidAlgorithmParameterException e) { - e.printStackTrace(); - AlertDialog.showError("Error occurred while decrypting text", e.toString()); - return null; - } - } - - void encryptFile(File in, File out) { - try { - cipher.init(Cipher.ENCRYPT_MODE, key, writeIV(out)); - } catch (InvalidKeyException | InvalidAlgorithmParameterException e) { - e.printStackTrace(); - AlertDialog.showError("AES-256 init error!", e.toString()); - return; - } - byte[] buffer = new byte[BLOCK_SIZE]; - writeIV(out); - try { - FileOutputStream fileOut = new FileOutputStream(out); - FileInputStream fileIn = new FileInputStream(in); - CipherOutputStream cipherOut = new CipherOutputStream(fileOut, cipher); - int read; - while ((read = fileIn.read(buffer))!=-1) { - cipherOut.write(buffer, 0, read); - } - fileIn.close(); - fileOut.close(); - cipherOut.close(); - AlertDialog.showInfo("File was successfully encrypted!"); - } catch (IOException e) { - e.printStackTrace(); - AlertDialog.showError("AES-256 file encryption error!", e.toString()); - } - } - - void decryptFile(File in, File out) { - try { - cipher.init(Cipher.DECRYPT_MODE, key, readIV(in)); - } catch (InvalidKeyException e) { - e.printStackTrace(); - AlertDialog.showError("AES-256 file decryption error!", e.toString()); - return; - } catch (InvalidAlgorithmParameterException e) { - e.printStackTrace(); - return; - //perform file decryption without initialization vector - } - byte[] buffer = new byte[BLOCK_SIZE]; - try { - FileInputStream fileIn = new FileInputStream(in); - //skip iv bytes - fileIn.getChannel().position(cipher.getBlockSize()); - FileOutputStream fileOut = new FileOutputStream(out); - - CipherInputStream cipherIn = new CipherInputStream(fileIn, cipher); - int read; - while ((read = cipherIn.read(buffer))!=-1) { - fileOut.write(buffer, 0, read); - } - fileIn.close(); - fileOut.close(); - cipherIn.close(); - AlertDialog.showInfo("File was successfully decrypted!"); - } catch (IOException e) { - e.printStackTrace(); - AlertDialog.showError("AES-256 file decryption error!", e.toString()); - } - } - - void setKey(String stringKey) { - try { - MessageDigest sha = MessageDigest.getInstance("SHA-1"); - byte[] bytes = stringKey.getBytes(StandardCharsets.UTF_8); - bytes = sha.digest(bytes); - bytes = Arrays.copyOf(bytes, 16); - key = new SecretKeySpec(bytes, "AES"); - System.out.println("AES-256 key set"); - } catch (NoSuchAlgorithmException e) { - e.printStackTrace(); - } - } - - void setKeyBase64(String keyBase64) { - key = new SecretKeySpec(Base64.getDecoder().decode(keyBase64), "AES"); - System.out.println("AES-256 key set"); - } - - private void generateIV() { - SecureRandom secureRandom = new SecureRandom(); - byte[] iv = new byte[16]; - secureRandom.nextBytes(iv); - ivParameterSpec = new IvParameterSpec(iv); - } - - private IvParameterSpec writeIV(File file) { - byte[] iv = new byte[cipher.getBlockSize()]; - try { - SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG"); - System.out.println(Arrays.toString(iv)); - secureRandom.nextBytes(iv); - FileOutputStream out = new FileOutputStream(file); - out.write(iv); - out.close(); - } catch (NoSuchAlgorithmException | IOException e) { - e.printStackTrace(); - } - return new IvParameterSpec(iv); - } - - private IvParameterSpec readIV(File file) { - byte[] iv = new byte[cipher.getBlockSize()]; - try { - FileInputStream in = new FileInputStream(file); - if (in.read(iv) != cipher.getBlockSize()) - throw new IOException("Cannot read the IV values"); - in.close(); - } catch (IOException e) { - e.printStackTrace(); - } - return new IvParameterSpec(iv); - } - - void generateKey() { -// try { -// KeyGenerator generator = KeyGenerator.getInstance("AES"); -// generator.init(256); -// key = generator.generateKey(); -// System.out.println("AES-256 key generated"); -// } catch (NoSuchAlgorithmException e) { -// e.printStackTrace(); -// } - } - - String getKey() { - return Base64.getEncoder().encodeToString(key.getEncoded()); - } - - private boolean checkKey() { - return true; - } - -} diff --git a/src/Cipher/Caesar.java b/src/Cipher/Caesar.java deleted file mode 100644 index f2c45f2..0000000 --- a/src/Cipher/Caesar.java +++ /dev/null @@ -1,7 +0,0 @@ -package Cipher; - -public class Caesar { - - - -} diff --git a/src/Cipher/CurrentCipher.java b/src/Cipher/CurrentCipher.java deleted file mode 100644 index 122054e..0000000 --- a/src/Cipher/CurrentCipher.java +++ /dev/null @@ -1,173 +0,0 @@ -package Cipher; - -import GUI.Main.AlertDialog; - -import java.io.File; - -public class CurrentCipher { - - private static int currentCipher; - - public static final int AES128 = 0; - public static final int AES256 = 1; - public static final int SimpleCipher = 2; - public static final int DES = 3; - public static final int DES3 = 4; - - private static Aes128 aes128 = new Aes128(); - private static Aes256 aes256 = new Aes256(); - private static Des des = new Des(); - private static Des3 des3 = new Des3(); - private static SimpleCipher simpleCipher; - - public static void setCurrentCipher(int a) { - currentCipher = a; - } - - private static int getCurrentCipher() { - return currentCipher; - } - - public static String getCurrentCipherName() { - switch (getCurrentCipher()) { - case AES128: - return "AES-128"; - case AES256: - return "AES-256"; - case DES: - return "DES"; - case DES3: - return "3DES"; - case SimpleCipher: - return "SimpleCipher"; - } - return null; - } - - public static String encrypt(String text) { - switch (getCurrentCipher()) { - case AES128: - return aes128.encryptString(text); - case AES256: - return aes256.encryptString(text); - case SimpleCipher: - AlertDialog.showError("Currently not available."); - break; - case DES: - return des.encryptString(text); - case DES3: - return des3.encryptString(text); - } - return null; - } - - public static String decrypt(String encryptedText) { - switch (getCurrentCipher()) { - case AES128: - return aes128.decryptString(encryptedText); - case AES256: - return aes256.decryptString(encryptedText); - case SimpleCipher: - AlertDialog.showError("Currently not available."); - break; - case DES: - return des.decryptString(encryptedText); - case DES3: - return des3.decryptString(encryptedText); - } - return null; - } - - public static void encryptFile(File enc, File res) { - switch (getCurrentCipher()) { - case AES128: - aes128.encryptFile(enc, res); - break; - case AES256: - aes256.encryptFile(enc, res); - break; - case SimpleCipher: - AlertDialog.showError("Not available."); - break; - case DES: - des.encryptFile(enc, res); - break; - case DES3: - des3.encryptFile(enc, res); - break; - } - } - - public static void decryptFile(File dec, File res) { - switch (getCurrentCipher()) { - case AES128: - aes128.decryptFile(dec, res); - break; - case AES256: - aes256.decryptFile(dec, res); - break; - case SimpleCipher: - AlertDialog.showError("Not available."); - break; - case DES: - des.decryptFile(dec, res); - break; - case DES3: - des3.decryptFile(dec, res); - break; - } - } - public static void generateKey() { - switch (getCurrentCipher()) { - case AES128: - aes128.generateKey(); - break; - case AES256: - aes256.generateKey(); - break; - case SimpleCipher: - AlertDialog.showError("Currently not available."); - break; - case DES: - des.generateKey(); - break; - } - } - - public static String getKey() { - switch (getCurrentCipher()) { - case AES128: - return aes128.getKey(); - case AES256: - return aes256.getKey(); - case SimpleCipher: - AlertDialog.showError("Currently not available."); - break; - case DES: - return des.getKey(); - case DES3: - return des3.getKey(); - } - return null; - } - - public static void setKey(String newKey) { - switch (getCurrentCipher()) { - case AES128: - aes128.setKey(newKey); - break; - case AES256: - aes256.setKey(newKey); - break; - case SimpleCipher: - AlertDialog.showError("Currently not available."); - break; - case DES: - des.setKey(newKey); - break; - case DES3: - des3.setKey(newKey); - break; - } - } -} diff --git a/src/Cipher/Des.java b/src/Cipher/Des.java deleted file mode 100644 index 991d9df..0000000 --- a/src/Cipher/Des.java +++ /dev/null @@ -1,161 +0,0 @@ -package Cipher; - -import GUI.Main.AlertDialog; -import Utils.RepairString; - -import javax.crypto.*; -import javax.crypto.spec.IvParameterSpec; -import javax.crypto.spec.SecretKeySpec; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.security.InvalidAlgorithmParameterException; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; -import java.util.Base64; - -class Des { - - private SecretKey key; - private Cipher cipher; - private IvParameterSpec ivParameterSpec; - - Des() { - try { - cipher = Cipher.getInstance("DES/CBC/PKCS5Padding"); - } catch (NoSuchAlgorithmException | NoSuchPaddingException e) { - e.printStackTrace(); - return; - } - generateIV(); - generateKey(); - } - - String encryptString(String text) { - try { - cipher.init(Cipher.ENCRYPT_MODE, key, ivParameterSpec); - return Base64.getEncoder().encodeToString(cipher.doFinal(text.getBytes(StandardCharsets.UTF_8))); - } catch (InvalidKeyException | IllegalBlockSizeException | BadPaddingException | InvalidAlgorithmParameterException e) { - e.printStackTrace(); - AlertDialog.showError("DES text encryption error", e.toString()); - return null; - } - } - - String decryptString(String encryptedText) { - byte[] data; - try { - data = Base64.getDecoder().decode(encryptedText.getBytes(StandardCharsets.UTF_8)); - } catch (IllegalArgumentException e) { - System.out.println("IllegalArgumentException caught"); - data = Base64.getDecoder().decode(RepairString.repairString(encryptedText).getBytes(StandardCharsets.UTF_8)); - } - try { - cipher.init(Cipher.DECRYPT_MODE, key, ivParameterSpec); - return new String(cipher.doFinal(data), StandardCharsets.UTF_8); - } catch (InvalidKeyException | IllegalBlockSizeException | BadPaddingException | InvalidAlgorithmParameterException e) { - e.printStackTrace(); - AlertDialog.showError("Error occurred while decrypting text", e.toString()); - return null; - } - } - - void encryptFile(File in, File out) { - try { - cipher.init(Cipher.ENCRYPT_MODE, key, ivParameterSpec); - } catch (InvalidKeyException | InvalidAlgorithmParameterException e) { - e.printStackTrace(); - AlertDialog.showError("DES init error!", e.toString()); - return; - } - byte[] iv = cipher.getIV(); - byte[] buffer = new byte[2048]; - try { - FileOutputStream fileOut = new FileOutputStream(out); - FileInputStream fileIn = new FileInputStream(in); - CipherOutputStream cipherOut = new CipherOutputStream(fileOut, cipher); - fileOut.write(iv); - while (fileIn.read(buffer, 0, buffer.length)!=-1) { - cipherOut.write(buffer, 0, buffer.length); - } - fileIn.close(); - fileOut.close(); - cipherOut.close(); - AlertDialog.showInfo("File was successfully encrypted!"); - } catch (IOException e) { - e.printStackTrace(); - AlertDialog.showError("DES file encryption error!", e.toString()); - } - } - - void decryptFile(File in, File out) { - IvParameterSpec parameterSpec; - try { - byte[] iv = new byte[8]; - FileInputStream temp = new FileInputStream(in); - temp.read(iv); - parameterSpec = new IvParameterSpec(iv); - } catch (IOException e) { - e.printStackTrace(); - return; - } - - try { - cipher.init(Cipher.DECRYPT_MODE, key, parameterSpec); - } catch (InvalidKeyException e) { - e.printStackTrace(); - AlertDialog.showError("DES file decryption error!", e.toString()); - return; - } catch (InvalidAlgorithmParameterException e) { - e.printStackTrace(); - return; - //perform file decryption without initialization vector - } - byte[] buffer = new byte[2048]; - try { - FileOutputStream fileOut = new FileOutputStream(out); - FileInputStream fileIn = new FileInputStream(in); - CipherOutputStream cipherOut = new CipherOutputStream(fileOut, cipher); - while (fileIn.read(buffer, 0, buffer.length)!=-1) { - cipherOut.write(buffer, 0, buffer.length); - } - fileIn.close(); - fileOut.close(); - cipherOut.close(); - AlertDialog.showInfo("File was successfully decrypted!"); - } catch (IOException e) { - e.printStackTrace(); - AlertDialog.showError("DES file decryption error!", e.toString()); - } - } - - void generateKey() { - try { - KeyGenerator generator = KeyGenerator.getInstance("DES"); - key = generator.generateKey(); - System.out.println("DES key generated"); - } catch (NoSuchAlgorithmException e) { - e.printStackTrace(); - } - } - - private void generateIV() { - SecureRandom secureRandom = new SecureRandom(); - byte[] iv = new byte[8]; - secureRandom.nextBytes(iv); - ivParameterSpec = new IvParameterSpec(iv); - } - - void setKey(String stringKey) { - key = new SecretKeySpec(stringKey.getBytes(), "AES"); - System.out.println("DES key set"); - } - - String getKey() { - return Base64.getEncoder().encodeToString(key.getEncoded()); - } - -} diff --git a/src/Cipher/Des3.java b/src/Cipher/Des3.java deleted file mode 100644 index c3e26d2..0000000 --- a/src/Cipher/Des3.java +++ /dev/null @@ -1,161 +0,0 @@ -package Cipher; - -import GUI.Main.AlertDialog; -import Utils.RepairString; - -import javax.crypto.*; -import javax.crypto.spec.IvParameterSpec; -import javax.crypto.spec.SecretKeySpec; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.security.InvalidAlgorithmParameterException; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; -import java.util.Base64; - -public class Des3 { - - private SecretKey key; - private Cipher cipher; - private IvParameterSpec ivParameterSpec; - - Des3() { - try { - cipher = Cipher.getInstance("DESede/CBC/PKCS5Padding"); - } catch (NoSuchAlgorithmException | NoSuchPaddingException e) { - e.printStackTrace(); - return; - } - generateIV(); - generateKey(); - } - - String encryptString(String text) { - try { - cipher.init(Cipher.ENCRYPT_MODE, key, ivParameterSpec); - return Base64.getEncoder().encodeToString(cipher.doFinal(text.getBytes(StandardCharsets.UTF_8))); - } catch (InvalidKeyException | IllegalBlockSizeException | BadPaddingException | InvalidAlgorithmParameterException e) { - e.printStackTrace(); - AlertDialog.showError("3DES text encryption error", e.toString()); - return null; - } - } - - String decryptString(String encryptedText) { - byte[] data; - try { - data = Base64.getDecoder().decode(encryptedText.getBytes(StandardCharsets.UTF_8)); - } catch (IllegalArgumentException e) { - System.out.println("IllegalArgumentException caught"); - data = Base64.getDecoder().decode(RepairString.repairString(encryptedText).getBytes(StandardCharsets.UTF_8)); - } - try { - cipher.init(Cipher.DECRYPT_MODE, key, ivParameterSpec); - return new String(cipher.doFinal(data), StandardCharsets.UTF_8); - } catch (InvalidKeyException | IllegalBlockSizeException | BadPaddingException | InvalidAlgorithmParameterException e) { - e.printStackTrace(); - AlertDialog.showError("Error occurred while decrypting text", e.toString()); - return null; - } - } - - void encryptFile(File in, File out) { - try { - cipher.init(Cipher.ENCRYPT_MODE, key, ivParameterSpec); - } catch (InvalidKeyException | InvalidAlgorithmParameterException e) { - e.printStackTrace(); - AlertDialog.showError("3DES init error!", e.toString()); - return; - } - byte[] iv = cipher.getIV(); - byte[] buffer = new byte[2048]; - try { - FileOutputStream fileOut = new FileOutputStream(out); - FileInputStream fileIn = new FileInputStream(in); - CipherOutputStream cipherOut = new CipherOutputStream(fileOut, cipher); - fileOut.write(iv); - while (fileIn.read(buffer, 0, buffer.length)!=-1) { - cipherOut.write(buffer, 0, buffer.length); - } - fileIn.close(); - fileOut.close(); - cipherOut.close(); - AlertDialog.showInfo("File was successfully encrypted!"); - } catch (IOException e) { - e.printStackTrace(); - AlertDialog.showError("3DES file encryption error!", e.toString()); - } - } - - void decryptFile(File in, File out) { - IvParameterSpec parameterSpec; - try { - byte[] iv = new byte[8]; - FileInputStream temp = new FileInputStream(in); - temp.read(iv); - parameterSpec = new IvParameterSpec(iv); - } catch (IOException e) { - e.printStackTrace(); - return; - } - - try { - cipher.init(Cipher.DECRYPT_MODE, key, parameterSpec); - } catch (InvalidKeyException e) { - e.printStackTrace(); - AlertDialog.showError("3DES file decryption error!", e.toString()); - return; - } catch (InvalidAlgorithmParameterException e) { - e.printStackTrace(); - return; - //perform file decryption without initialization vector - } - byte[] buffer = new byte[2048]; - try { - FileOutputStream fileOut = new FileOutputStream(out); - FileInputStream fileIn = new FileInputStream(in); - CipherOutputStream cipherOut = new CipherOutputStream(fileOut, cipher); - while (fileIn.read(buffer, 0, buffer.length)!=-1) { - cipherOut.write(buffer, 0, buffer.length); - } - fileIn.close(); - fileOut.close(); - cipherOut.close(); - AlertDialog.showInfo("File was successfully decrypted!"); - } catch (IOException e) { - e.printStackTrace(); - AlertDialog.showError("3DES file decryption error!", e.toString()); - } - } - - void generateKey() { - try { - KeyGenerator generator = KeyGenerator.getInstance("DESede"); - key = generator.generateKey(); - System.out.println("3DES key generated"); - } catch (NoSuchAlgorithmException e) { - e.printStackTrace(); - } - } - - private void generateIV() { - SecureRandom secureRandom = new SecureRandom(); - byte[] iv = new byte[8]; - secureRandom.nextBytes(iv); - ivParameterSpec = new IvParameterSpec(iv); - } - - void setKey(String stringKey) { - key = new SecretKeySpec(stringKey.getBytes(), "DESede/CBC/PKCS5Padding"); - System.out.println("3DES key set"); - } - - String getKey() { - return Base64.getEncoder().encodeToString(key.getEncoded()); - } - -} diff --git a/src/Cipher/RSA.java b/src/Cipher/RSA.java deleted file mode 100644 index 694a61d..0000000 --- a/src/Cipher/RSA.java +++ /dev/null @@ -1,4 +0,0 @@ -package Cipher; - -public class RSA { -} diff --git a/src/Cipher/SimpleCipher.java b/src/Cipher/SimpleCipher.java deleted file mode 100644 index 2dd20cc..0000000 --- a/src/Cipher/SimpleCipher.java +++ /dev/null @@ -1,113 +0,0 @@ -package Cipher; - -public class SimpleCipher { - - private static String allChars = ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 ,.!?:;()*&^%$#@-=+_"); - private static String combination = null; - private static String key = null; - - - public SimpleCipher() { - updateCombination(); - } - - public static String encryption(String text) { - StringBuilder encrypted = new StringBuilder(); - for (int i = 0; i < text.length(); i++) { - int index = 0; - char a = text.charAt(i); - - for (int j = 0; j < allChars.length(); j++) { - if (a == allChars.charAt(j)) { - index = j; - break; - } else { - index++; - } - } - encrypted.append(combination.charAt(index)); - } - return encrypted.toString(); - } - - public static String decryption(String text) { - StringBuilder decrypted = new StringBuilder(); - for (int i = 0; i < text.length(); i++) { - int index = 0; - char a = text.charAt(i); - - for (int j = 0; j < combination.length(); j++) { - if (a == combination.charAt(j)) { - index = j; - break; - } else - index++; - } - decrypted.append(allChars.charAt(index)); - } - return decrypted.toString(); - } - - public static void updateCombination() { - - int[] arr = new int[allChars.length()]; - randomSort(arr); - String temp = ""; - for (int value : arr) { - temp = temp.concat(String.valueOf(combination.charAt(value - 1))); - } - combination = temp; - } - - public static void setKey(String key) { - - } - - public static String getKey() { - return key; - } - - private static int[] getCombFromKey() { - StringBuilder num = new StringBuilder(); - int[] mixPos = new int[allChars.length()]; - int index = 0; - for (int i = 0; i < combination.length(); i++) { - if (Character.isDigit(combination.charAt(i))) { - num.append(combination.charAt(i)); - } else { - mixPos[index] = Integer.parseInt(num.toString()); - index++; - num = new StringBuilder(); - } - } - return mixPos; - } - - private static void randomSort(int[] inputArray){ - int count = 0; - StringBuilder builder = new StringBuilder(); - for (int i = 0; i < inputArray.length; i++){ - int randomNumber = (int)(1+(Math.random()*inputArray.length)); - inputArray[i] = randomNumber; - count++; - for (int q = 0; q < count; q++){ - if (q==i) { - builder.append(randomNumber).append(allChars.charAt((int)(Math.random()*56+1))); - break; - } - - if (randomNumber == inputArray[q]){ - i--; - count--; - break; - } - } - } - key = builder.toString(); - } - - private static void randomSort() { - - } - -} diff --git a/src/GUI/Controllers/AboutPageController.java b/src/GUI/Controllers/AboutPageController.java deleted file mode 100644 index 9510f88..0000000 --- a/src/GUI/Controllers/AboutPageController.java +++ /dev/null @@ -1,48 +0,0 @@ -package GUI.Controllers; - -import GUI.Main.GUI; -import GUI.Main.AlertDialog; -import javafx.scene.image.Image; -import javafx.scene.image.ImageView; - -import java.awt.*; -import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; - -public class AboutPageController { - - public ImageView menuImage; - - public void repoLinkAction() { - try { - Desktop.getDesktop().browse(new URI("https://github.com/MasterFlomaster1/SimpleJavaCrypter")); - } catch (IOException | URISyntaxException e) { - e.printStackTrace(); - AlertDialog.showError("Error"); - } - } - - public void profileLinkAction() { - try { - Desktop.getDesktop().browse(new URI("https://github.com/MasterFlomaster1")); - } catch (IOException | URISyntaxException e) { - e.printStackTrace(); - AlertDialog.showError("Error"); - } - } - - public void menuButtonPressed() { - menuImage.setImage(new javafx.scene.image.Image("/menu2.png")); - GUI.menuButtonPressed(); - } - - public void menuButtonRelease() { - menuImage.setImage(new javafx.scene.image.Image("/menu1.png")); - } - - public void mouseEntered() { - menuImage.setImage(new Image("/menu2.png")); - } - -} diff --git a/src/GUI/Controllers/FileEncryptionPageController.java b/src/GUI/Controllers/FileEncryptionPageController.java deleted file mode 100644 index ce3dcb8..0000000 --- a/src/GUI/Controllers/FileEncryptionPageController.java +++ /dev/null @@ -1,135 +0,0 @@ -package GUI.Controllers; - -import GUI.Main.GUI; -import GUI.Main.AlertDialog; -import Utils.PathCutter; -import Cipher.CurrentCipher; - -import javafx.fxml.FXML; -import javafx.scene.control.Button; -import javafx.scene.image.Image; -import javafx.scene.image.ImageView; -import javafx.scene.input.DragEvent; -import javafx.scene.input.TransferMode; -import javafx.scene.text.Text; -import javafx.stage.FileChooser; -import java.io.File; -import java.util.List; - -public class FileEncryptionPageController { - - @FXML - public Button browseInFile; - - @FXML - public Button browseOutFile; - - @FXML - public Text fileInPath; - - @FXML - public Text fileOutPath; - - @FXML - public Text dragNDropText; - - private boolean fileInReady = false; - private boolean fileOutReady = false; - private File in; - private File out; - public ImageView menuImage; - - public void encryptButtonAction() { - if ((fileInReady && fileOutReady) && in!=out) { - CurrentCipher.encryptFile(in, out); - } else if (fileInReady && out!=null) { - if (AlertDialog.showConfirmDialog("Do you want to rewrite \"" + out.getName() + "\" ?")) { - CurrentCipher.encryptFile(in, out); - fileInReady = false; - fileOutReady = false; - } - } else if (fileInReady) { - AlertDialog.showWarning("Select result file path"); - } else if (fileOutReady) { - AlertDialog.showWarning("Choose file you want to encrypt/decrypt"); - } - } - - public void decryptButtonAction() { - if ((fileInReady && fileOutReady) && in!=out) { - CurrentCipher.decryptFile(in, out); - } else if (fileInReady && out!=null) { - if (AlertDialog.showConfirmDialog("Do you want to rewrite \"" + out.getName() + "\" ?")) { - CurrentCipher.decryptFile(in, out); - fileInReady = false; - fileOutReady = false; - } else if (fileInReady) { - AlertDialog.showWarning("Select result file path"); - } else if (fileOutReady) { - AlertDialog.showWarning("Choose file you want to encrypt/decrypt"); - } - } - } - - public void browseInButtonAction() { - FileChooser fileChooser = new FileChooser(); - fileChooser.setTitle("Select file"); - in = fileChooser.showOpenDialog(browseInFile.getScene().getWindow()); - //Debug here - if (in==null) { - fileInReady = false; - return; - } - hideDragDropText(); - fileInPath.setText(PathCutter.cutPath(in.getPath())); - fileInReady = true; - } - - public void browseOutButtonAction() { - FileChooser save = new FileChooser(); - save.setTitle("Save file"); - out = save.showSaveDialog(browseOutFile.getScene().getWindow()); - //Debug here - if (out==null) { - fileOutReady = false; - return; - } - fileOutPath.setText(PathCutter.cutPath(out.getPath())); - fileOutReady = true; - } - - public void handleDragOver(DragEvent event) { - if (event.getDragboard().hasFiles()) { - event.acceptTransferModes(TransferMode.ANY); - } - } - - public void handleDragDropped(DragEvent event) { - List files = event.getDragboard().getFiles(); - in = files.get(0); - hideDragDropText(); - fileInPath.setText(PathCutter.cutPath(in.getPath())); - fileInReady = true; - } - - private void hideDragDropText() { - dragNDropText.setVisible(false); - } - - private void enableDragDropText() { - dragNDropText.setDisable(true); - } - - public void menuButtonPressed() { - menuImage.setImage(new Image("/menu2.png")); - GUI.menuButtonPressed(); - } - - public void menuButtonRelease() { - menuImage.setImage(new Image("/menu1.png")); - } - - public void mouseEntered() { - menuImage.setImage(new Image("/menu2.png")); - } -} diff --git a/src/GUI/Controllers/FileHashPageController.java b/src/GUI/Controllers/FileHashPageController.java deleted file mode 100644 index 61746c0..0000000 --- a/src/GUI/Controllers/FileHashPageController.java +++ /dev/null @@ -1,93 +0,0 @@ -package GUI.Controllers; - -import GUI.Main.GUI; -import Hash.CurrentHash; -import Utils.PathCutter; -import javafx.fxml.FXML; -import javafx.scene.control.Button; -import javafx.scene.control.TextArea; -import javafx.scene.image.Image; -import javafx.scene.image.ImageView; -import javafx.scene.input.DragEvent; -import javafx.scene.input.TransferMode; -import javafx.scene.text.Text; -import javafx.stage.FileChooser; - -import java.io.File; -import java.util.List; - -public class FileHashPageController { - - public ImageView menuImage; - - @FXML - public Button browseInFile; - - @FXML - public Text fileInPath; - - @FXML - public Text dragNDropText; - - @FXML - public TextArea hashSumText; - - private boolean fileInReady = false; - private File in; - - public void browseInButtonAction() { - FileChooser fileChooser = new FileChooser(); - fileChooser.setTitle("Select file"); - in = fileChooser.showOpenDialog(browseInFile.getScene().getWindow()); - //debug here - if (in==null) { - fileInReady = false; - return; - } - hideDragDropText(); - fileInPath.setText(PathCutter.cutPath(in.getPath())); - fileInReady = true; - } - - public void handleDragOver(DragEvent event) { - if (event.getDragboard().hasFiles()) { - event.acceptTransferModes(TransferMode.ANY); - } - } - - public void handleDragDropped(DragEvent event) { - List files = event.getDragboard().getFiles(); - in = files.get(0); - hideDragDropText(); - fileInPath.setText(PathCutter.cutPath(in.getPath())); - fileInReady = true; - } - - public void hashButtonAction() { - if (fileInReady) { - hashSumText.setText(CurrentHash.fileHashSum(in)); - } - } - - private void hideDragDropText() { - dragNDropText.setVisible(false); - } - - private void enableDragDropText() { - dragNDropText.setDisable(true); - } - - public void menuButtonPressed() { - menuImage.setImage(new javafx.scene.image.Image("/menu2.png")); - GUI.menuButtonPressed(); - } - - public void menuButtonRelease() { - menuImage.setImage(new javafx.scene.image.Image("/menu1.png")); - } - - public void mouseEntered() { - menuImage.setImage(new Image("/menu2.png")); - } - -} diff --git a/src/GUI/Controllers/HashSumCheckerPageController.java b/src/GUI/Controllers/HashSumCheckerPageController.java deleted file mode 100644 index 9374d8d..0000000 --- a/src/GUI/Controllers/HashSumCheckerPageController.java +++ /dev/null @@ -1,97 +0,0 @@ -package GUI.Controllers; - -import GUI.Main.GUI; -import Hash.CurrentHash; -import Utils.PathCutter; -import javafx.fxml.FXML; -import javafx.scene.control.Button; -import javafx.scene.control.TextArea; -import javafx.scene.image.Image; -import javafx.scene.image.ImageView; -import javafx.scene.input.DragEvent; -import javafx.scene.input.TransferMode; -import javafx.scene.text.Text; -import javafx.stage.FileChooser; - -import java.io.File; -import java.util.List; - -public class HashSumCheckerPageController { - - @FXML - public Button browseInFile; - - @FXML - public Text fileInPath; - - @FXML - public Text dragNDropText; - - @FXML - public TextArea hash2; - - private File in; - private boolean fileInReady = false; - public ImageView menuImage; - public ImageView operationStatus; - - public void verifyChecksum() { - if (fileInReady && hash2.getText()!=null) { - if (hash2.getText().equals(CurrentHash.fileHashSum(in))) { - operationStatus.setImage(new Image("/d30.png")); - } else { - operationStatus.setImage(new Image("/e30.png")); - } - } - } - - public void browseInButtonAction() { - FileChooser fileChooser = new FileChooser(); - fileChooser.setTitle("Select file"); - in = fileChooser.showOpenDialog(browseInFile.getScene().getWindow()); - //Debug here - if (in==null) { - fileInReady = false; - return; - } - hideDragDropText(); - fileInPath.setText(PathCutter.cutPath(in.getPath())); - fileInReady = true; - } - - public void handleDragOver(DragEvent event) { - if (event.getDragboard().hasFiles()) { - event.acceptTransferModes(TransferMode.ANY); - } - } - - public void handleDragDropped(DragEvent event) { - List files = event.getDragboard().getFiles(); - in = files.get(0); - hideDragDropText(); - fileInPath.setText(PathCutter.cutPath(in.getPath())); - fileInReady = true; - } - - private void hideDragDropText() { - dragNDropText.setVisible(false); - } - - private void enableDragDropText() { - dragNDropText.setDisable(true); - } - - public void menuButtonPressed() { - menuImage.setImage(new Image("/menu2.png")); - GUI.menuButtonPressed(); - } - - public void menuButtonRelease() { - menuImage.setImage(new Image("/menu1.png")); - } - - public void mouseEntered() { - menuImage.setImage(new Image("/menu2.png")); - } - -} diff --git a/src/GUI/Controllers/HomePageController.java b/src/GUI/Controllers/HomePageController.java deleted file mode 100644 index 846e010..0000000 --- a/src/GUI/Controllers/HomePageController.java +++ /dev/null @@ -1,33 +0,0 @@ -package GUI.Controllers; - -import GUI.Main.GUI; -import GUI.Main.Pages; -import javafx.scene.image.Image; -import javafx.scene.image.ImageView; - -public class HomePageController { - - public ImageView menuImage; - - public void textEncryptionPageAction() { - GUI.updatePageContent(Pages.TEXT_ENCRYPTION_PAGE.getParent()); - } - - public void fileEncryptionPageAction() { - GUI.updatePageContent(Pages.FILE_ENCRYPTION_PAGE.getParent()); - } - - public void menuButtonPressed() { - menuImage.setImage(new Image("/menu2.png")); - GUI.menuButtonPressed(); - } - - public void menuButtonRelease() { - menuImage.setImage(new Image("/menu1.png")); - } - - public void mouseEntered() { - menuImage.setImage(new Image("/menu2.png")); - } - -} diff --git a/src/GUI/Controllers/MenuBarController.java b/src/GUI/Controllers/MenuBarController.java deleted file mode 100644 index da6d12b..0000000 --- a/src/GUI/Controllers/MenuBarController.java +++ /dev/null @@ -1,158 +0,0 @@ -package GUI.Controllers; - -import Cipher.CurrentCipher; -import GUI.Main.*; -import Hash.CurrentHash; -import javafx.fxml.FXML; -import javafx.scene.control.RadioMenuItem; -import javafx.scene.control.ToggleGroup; - -public class MenuBarController { - - @FXML - private RadioMenuItem AES128_radio; - - @FXML - private RadioMenuItem AES256_radio; - - @FXML - private RadioMenuItem SimpleCipher_radio; - - @FXML - private RadioMenuItem DES_radio; - - @FXML - private RadioMenuItem DES3_radio; - - @FXML - private RadioMenuItem MD2_radio; - - @FXML - private RadioMenuItem MD5_radio; - - @FXML - private RadioMenuItem SHA1_radio; - - @FXML - private RadioMenuItem SHA224_radio; - - @FXML - private RadioMenuItem SHA256_radio; - - @FXML - private RadioMenuItem SHA384_radio; - - @FXML - private RadioMenuItem SHA512_radio; - - public void initialize() { - radioMenuInit(); - } - - public void genKeyAction() { - CurrentCipher.generateKey(); - } - - public void showKeyAction() { - ShowKey showKey = new ShowKey(); - showKey.showKey(); - } - - public void setKeyAction() { - UserKey.getKeyFromUser(); - } - - public void homePageAction() { - GUI.updatePageContent(Pages.HOME_PAGE.getParent()); - } - - public void aboutAction() { - GUI.updatePageContent(Pages.ABOUT_PAGE.getParent()); - } - - public void settingsAction() { - GUI.updatePageContent(Pages.SETTINGS_PAGE.getParent()); - } - - public void DES_radioAction() { - DES_radio.setSelected(true); - CurrentCipher.setCurrentCipher(CurrentCipher.DES); - } - - public void DES3_radioAction() { - DES3_radio.setSelected(true); - CurrentCipher.setCurrentCipher(CurrentCipher.DES3); - } - - public void AES128_radioAction() { - AES128_radio.setSelected(true); - CurrentCipher.setCurrentCipher(CurrentCipher.AES128); - } - - public void AES256_radioAction() { - AES256_radio.setSelected(true); - CurrentCipher.setCurrentCipher(CurrentCipher.AES256); - } - - public void SimpleCipher_radioAction() { - SimpleCipher_radio.setSelected(true); - CurrentCipher.setCurrentCipher(CurrentCipher.SimpleCipher); - } - - public void MD2_radioAction() { - MD2_radio.setSelected(true); - CurrentHash.setCurrentHash(CurrentHash.MD2); - } - - public void MD5_radioAction() { - MD5_radio.setSelected(true); - CurrentHash.setCurrentHash(CurrentHash.MD5); - } - - public void SHA1_radioAction() { - SHA1_radio.setSelected(true); - CurrentHash.setCurrentHash(CurrentHash.SHA1); - } - - public void SHA224_radioAction() { - SHA224_radio.setSelected(true); - CurrentHash.setCurrentHash(CurrentHash.SHA224); - } - - public void SHA256_radioAction() { - SHA256_radio.setSelected(true); - CurrentHash.setCurrentHash(CurrentHash.SHA256); - } - - public void SHA384_radioAction() { - SHA384_radio.setSelected(true); - CurrentHash.setCurrentHash(CurrentHash.SHA384); - } - - public void SHA512_radioAction() { - MD2_radio.setSelected(true); - CurrentHash.setCurrentHash(CurrentHash.SHA512); - } - - private void radioMenuInit() { - ToggleGroup ciphers = new ToggleGroup(); - AES128_radio.setToggleGroup(ciphers); - AES256_radio.setToggleGroup(ciphers); - SimpleCipher_radio.setToggleGroup(ciphers); - DES_radio.setToggleGroup(ciphers); - AES256_radio.setSelected(true); - CurrentCipher.setCurrentCipher(CurrentCipher.AES256); - ToggleGroup hash = new ToggleGroup(); - MD2_radio.setToggleGroup(hash); - MD5_radio.setToggleGroup(hash); - SHA1_radio.setToggleGroup(hash); - SHA224_radio.setToggleGroup(hash); - SHA256_radio.setToggleGroup(hash); - SHA384_radio.setToggleGroup(hash); - SHA512_radio.setToggleGroup(hash); - MD5_radio.setSelected(true); - CurrentHash.setCurrentHash(CurrentHash.MD5); - } - - -} diff --git a/src/GUI/Controllers/SettingsPageController.java b/src/GUI/Controllers/SettingsPageController.java deleted file mode 100644 index a8b3ed5..0000000 --- a/src/GUI/Controllers/SettingsPageController.java +++ /dev/null @@ -1,24 +0,0 @@ -package GUI.Controllers; - -import GUI.Main.GUI; -import javafx.scene.image.Image; -import javafx.scene.image.ImageView; - -public class SettingsPageController { - - public ImageView menuImage; - - public void menuButtonPressed() { - menuImage.setImage(new javafx.scene.image.Image("/menu2.png")); - - } - - public void menuButtonRelease() { - menuImage.setImage(new javafx.scene.image.Image("/menu1.png")); - } - - public void mouseEntered() { - menuImage.setImage(new Image("/menu2.png")); - } - -} diff --git a/src/GUI/Controllers/ShowKeyController.java b/src/GUI/Controllers/ShowKeyController.java deleted file mode 100644 index d8185a6..0000000 --- a/src/GUI/Controllers/ShowKeyController.java +++ /dev/null @@ -1,21 +0,0 @@ -package GUI.Controllers; - -import Cipher.CurrentCipher; -import javafx.fxml.FXML; -import javafx.scene.control.TextField; -import javafx.scene.text.Text; - -public class ShowKeyController { - - @FXML - private Text cipherName; - - @FXML - private TextField keyField; - - public void initialize() { - cipherName.setText(CurrentCipher.getCurrentCipherName()+" KEY"); - keyField.setText(CurrentCipher.getKey()); - } - -} diff --git a/src/GUI/Controllers/SideMenuController.java b/src/GUI/Controllers/SideMenuController.java deleted file mode 100644 index 6c04673..0000000 --- a/src/GUI/Controllers/SideMenuController.java +++ /dev/null @@ -1,43 +0,0 @@ -package GUI.Controllers; - -import GUI.Main.GUI; -import GUI.Main.Pages; - -public class SideMenuController { - - public void homeButtonAction() { - GUI.updatePageContent(Pages.HOME_PAGE.getParent()); - GUI.hideMenu(); - } - - public void hashSumCheckerButtonAction() { - GUI.updatePageContent(Pages.HASH_SUM_CHECKER_PAGE.getParent()); - GUI.hideMenu(); - } - - public void textEncryptionButtonAction() { - GUI.updatePageContent(Pages.TEXT_ENCRYPTION_PAGE.getParent()); - GUI.hideMenu(); - } - - public void fileEncryptionButtonAction() { - GUI.updatePageContent(Pages.FILE_ENCRYPTION_PAGE.getParent()); - GUI.hideMenu(); - } - - public void fileHashButtonAction() { - GUI.updatePageContent(Pages.FILE_HASH_PAGE.getParent()); - GUI.hideMenu(); - } - - public void textHashButtonAction() { - GUI.updatePageContent(Pages.TEXT_HASH_PAGE.getParent()); - GUI.hideMenu(); - } - - public void aboutButtonAction() { - GUI.updatePageContent(Pages.ABOUT_PAGE.getParent()); - GUI.hideMenu(); - } - -} diff --git a/src/GUI/Controllers/TextEncryptionPageController.java b/src/GUI/Controllers/TextEncryptionPageController.java deleted file mode 100644 index 39c4670..0000000 --- a/src/GUI/Controllers/TextEncryptionPageController.java +++ /dev/null @@ -1,47 +0,0 @@ -package GUI.Controllers; - -import Cipher.CurrentCipher; -import GUI.Main.GUI; -import javafx.fxml.FXML; -import javafx.scene.control.TextArea; -import javafx.scene.image.Image; -import javafx.scene.image.ImageView; - -public class TextEncryptionPageController { - - public ImageView menuImage; - - @FXML - private TextArea inputText; - - @FXML - private TextArea outputText; - - public void encrypt() { - outputText.setText(CurrentCipher.encrypt(inputText.getText())); - } - - public void decrypt() { - outputText.setText(CurrentCipher.decrypt(inputText.getText())); - } - - public void initialize() { - inputText.setPromptText("Input text"); - inputText.setFocusTraversable(false); - outputText.setPromptText("Output text"); - } - - public void menuButtonPressed() { - menuImage.setImage(new javafx.scene.image.Image("/menu2.png")); - GUI.menuButtonPressed(); - } - - public void menuButtonRelease() { - menuImage.setImage(new javafx.scene.image.Image("/menu1.png")); - } - - public void mouseEntered() { - menuImage.setImage(new Image("/menu2.png")); - } - -} diff --git a/src/GUI/Controllers/TextHashPageController.java b/src/GUI/Controllers/TextHashPageController.java deleted file mode 100644 index 183571f..0000000 --- a/src/GUI/Controllers/TextHashPageController.java +++ /dev/null @@ -1,43 +0,0 @@ -package GUI.Controllers; - -import GUI.Main.GUI; -import Hash.CurrentHash; -import javafx.fxml.FXML; -import javafx.scene.control.TextArea; -import javafx.scene.image.Image; -import javafx.scene.image.ImageView; - -public class TextHashPageController { - - public ImageView menuImage; - - @FXML - private TextArea inputText; - - @FXML - private TextArea outputText; - - public void initialize() { - inputText.setPromptText("Input text"); - inputText.setFocusTraversable(false); - outputText.setPromptText("Output text"); - } - - public void hashButtonAction() { - outputText.setText(CurrentHash.hashText(inputText.getText())); - } - - public void menuButtonPressed() { - menuImage.setImage(new javafx.scene.image.Image("/menu2.png")); - GUI.menuButtonPressed(); - } - - public void menuButtonRelease() { - menuImage.setImage(new javafx.scene.image.Image("/menu1.png")); - } - - public void mouseEntered() { - menuImage.setImage(new Image("/menu2.png")); - } - -} diff --git a/src/GUI/Controllers/UserKeyController.java b/src/GUI/Controllers/UserKeyController.java deleted file mode 100644 index 8c8fb5f..0000000 --- a/src/GUI/Controllers/UserKeyController.java +++ /dev/null @@ -1,28 +0,0 @@ -package GUI.Controllers; - -import Cipher.CurrentCipher; -import javafx.fxml.FXML; -import javafx.scene.control.TextField; -import javafx.scene.text.Text; -import javafx.stage.Stage; - -public class UserKeyController { - - @FXML - private Text cipherName; - - @FXML - private TextField userKeyField; - - public void initialize() { - cipherName.setText("Enter "+CurrentCipher.getCurrentCipherName()+" key: "); - } - - public void enterKey() { - String userKey = userKeyField.getText(); - CurrentCipher.setKey(userKey); - Stage stage = (Stage) userKeyField.getScene().getWindow(); - stage.close(); - } - -} diff --git a/src/GUI/Main/AlertDialog.java b/src/GUI/Main/AlertDialog.java deleted file mode 100644 index 0f9ee27..0000000 --- a/src/GUI/Main/AlertDialog.java +++ /dev/null @@ -1,50 +0,0 @@ -package GUI.Main; - -import javafx.scene.control.Alert; -import javafx.scene.control.ButtonType; - -import java.util.Optional; - -/** - * Add icons - */ -public class AlertDialog { - - public static void showError(String error, String details) { - Alert alert = new Alert(Alert.AlertType.ERROR); - alert.setTitle("Error"); - alert.setHeaderText(error); - alert.setContentText(details); - alert.showAndWait(); - } - - public static void showError(String error) { - Alert alert = new Alert(Alert.AlertType.ERROR); - alert.setTitle("Error"); - alert.setHeaderText(error); - alert.showAndWait(); - } - - public static void showWarning(String warn) { - Alert alert = new Alert(Alert.AlertType.WARNING); - alert.setTitle("Warning"); - alert.setHeaderText(warn); - alert.showAndWait(); - } - - public static void showInfo(String info) { - Alert alert = new Alert(Alert.AlertType.INFORMATION); - alert.setTitle("Info"); - alert.setHeaderText(info); - alert.showAndWait(); - } - - public static boolean showConfirmDialog(String warn) { - Alert alert = new Alert(Alert.AlertType.CONFIRMATION); - alert.setTitle("Warning"); - alert.setHeaderText(warn); - Optional option = alert.showAndWait(); - return option.isPresent() && option.get() == ButtonType.OK; - } - -} diff --git a/src/GUI/Main/GUI.java b/src/GUI/Main/GUI.java deleted file mode 100644 index a31c35a..0000000 --- a/src/GUI/Main/GUI.java +++ /dev/null @@ -1,96 +0,0 @@ -package GUI.Main; - -import javafx.animation.TranslateTransition; -import javafx.application.Application; -import javafx.fxml.FXMLLoader; -import javafx.scene.Node; -import javafx.scene.Parent; -import javafx.scene.Scene; -import javafx.scene.image.Image; -import javafx.scene.layout.BorderPane; -import javafx.scene.layout.Pane; -import javafx.scene.layout.VBox; -import javafx.stage.Stage; -import javafx.util.Duration; - -import java.io.IOException; - -public class GUI extends Application { - - private static BorderPane borderPane = new BorderPane(); - private static Pane pane; - private static VBox menu; - private static TranslateTransition menuTranslation; - - @Override - public void start(Stage primaryStage) { - try { - primaryStage.setTitle("SimpleJavaCrypter"); - primaryStage.getIcons().add(new Image("/SJC1.png")); - initializePages(); - - Scene scene = new Scene(new Pane(), 590, 390); - Parent menuBar = FXMLLoader.load(getClass().getResource("/GUI/fxml/MenuBar.fxml")); - - borderPane.setTop(menuBar); - pane = new Pane(Pages.HOME_PAGE.getParent()); - pane.getStylesheets().add(getClass().getResource("/GUI/css/General.css").toExternalForm()); - borderPane.setCenter(pane); - - menu = FXMLLoader.load(getClass().getResource("/GUI/fxml/SideMenu.fxml")); - - menu.setTranslateX(-200); - menuTranslation = new TranslateTransition(Duration.millis(250), menu); - menuTranslation.setFromX(-400); - menuTranslation.setToX(0); - - menu.setOnMouseExited(evt -> { - //bug here - menuTranslation.setRate(-1); - menuTranslation.play(); - }); - - pane.getChildren().add(menu); - scene.setRoot(borderPane); - primaryStage.setResizable(false); - primaryStage.setScene(scene); - primaryStage.show(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - private void initializePages() { - try { - Pages.ABOUT_PAGE.setParent(FXMLLoader.load(getClass().getResource("/GUI/fxml/AboutPage.fxml"))); - Pages.FILE_ENCRYPTION_PAGE.setParent(FXMLLoader.load(getClass().getResource("/GUI/fxml/FileEncryptionPage.fxml"))); - Pages.FILE_HASH_PAGE.setParent(FXMLLoader.load(getClass().getResource("/GUI/fxml/FileHashPage.fxml"))); - Pages.HASH_SUM_CHECKER_PAGE.setParent(FXMLLoader.load(getClass().getResource("/GUI/fxml/HashSumCheckerPage.fxml"))); - Pages.HOME_PAGE.setParent(FXMLLoader.load(getClass().getResource("/GUI/fxml/HomePage.fxml"))); - Pages.SETTINGS_PAGE.setParent(FXMLLoader.load(getClass().getResource("/GUI/fxml/SettingsPage.fxml"))); - Pages.TEXT_ENCRYPTION_PAGE.setParent(FXMLLoader.load(getClass().getResource("/GUI/fxml/TextEncryptionPage.fxml"))); - Pages.TEXT_HASH_PAGE.setParent(FXMLLoader.load(getClass().getResource("/GUI/fxml/TextHashPage.fxml"))); - } catch (IOException e) { - e.printStackTrace(); - } - } - - public static void updatePageContent(Node nextNode) { - pane.getChildren().set(0, nextNode); - } - - public static void hideMenu() { - menuTranslation.setRate(-1); - menuTranslation.play(); - } - - public static void menuButtonPressed() { - menuTranslation.setRate(1); - menuTranslation.play(); - } - - public static void main(String[] args) { - launch(args); - } - -} diff --git a/src/GUI/Main/Pages.java b/src/GUI/Main/Pages.java deleted file mode 100644 index c8f8ffe..0000000 --- a/src/GUI/Main/Pages.java +++ /dev/null @@ -1,30 +0,0 @@ -package GUI.Main; - -import javafx.scene.Parent; - -public enum Pages { - - ABOUT_PAGE (null), - FILE_ENCRYPTION_PAGE (null), - FILE_HASH_PAGE (null), - HASH_SUM_CHECKER_PAGE (null), - HOME_PAGE (null), - TEXT_ENCRYPTION_PAGE (null), - TEXT_HASH_PAGE (null), - SETTINGS_PAGE(null); - - private Parent parent; - - Pages(Parent parent) { - this.parent = parent; - } - - public Parent getParent() { - return parent; - } - - public void setParent(Parent parent) { - this.parent = parent; - } - -} diff --git a/src/GUI/Main/ShowKey.java b/src/GUI/Main/ShowKey.java deleted file mode 100644 index 15ce388..0000000 --- a/src/GUI/Main/ShowKey.java +++ /dev/null @@ -1,31 +0,0 @@ -package GUI.Main; - -import javafx.fxml.FXMLLoader; -import javafx.scene.Parent; -import javafx.scene.Scene; -import javafx.scene.image.Image; -import javafx.stage.Modality; -import javafx.stage.Stage; - -import java.io.IOException; - -public class ShowKey { - - public void showKey() { - try { - Stage showKey = new Stage(); - Parent content = FXMLLoader.load(getClass().getResource("/GUI/fxml/ShowKey.fxml")); - Scene scene = new Scene(content); - content.setId("showKey"); - showKey.setTitle("key"); - showKey.getIcons().add(new Image("/SJC1.png")); - showKey.setResizable(false); - showKey.setScene(scene); - showKey.initModality(Modality.APPLICATION_MODAL); - showKey.show(); - } catch (IOException e) { - e.printStackTrace(); - } - } - -} diff --git a/src/GUI/Main/UserKey.java b/src/GUI/Main/UserKey.java deleted file mode 100644 index be96eba..0000000 --- a/src/GUI/Main/UserKey.java +++ /dev/null @@ -1,31 +0,0 @@ -package GUI.Main; - -import javafx.fxml.FXMLLoader; -import javafx.scene.Parent; -import javafx.scene.Scene; -import javafx.scene.image.Image; -import javafx.stage.Modality; -import javafx.stage.Stage; - -import java.io.IOException; - -public class UserKey { - - public static void getKeyFromUser() { - try { - Parent content = FXMLLoader.load(UserKey.class.getResource("/GUI/fxml/UserKey.fxml")); - Scene scene = new Scene(content); - content.setId("userKey"); - Stage userKey = new Stage(); - userKey.getIcons().add(new Image("/SJC1.png")); - userKey.initModality(Modality.APPLICATION_MODAL); - userKey.setTitle("Enter key"); - userKey.setScene(scene); - userKey.setResizable(false); - userKey.show(); - } catch (IOException e) { - e.printStackTrace(); - } - } - -} diff --git a/src/GUI/css/General.css b/src/GUI/css/General.css deleted file mode 100644 index 37230cc..0000000 --- a/src/GUI/css/General.css +++ /dev/null @@ -1,27 +0,0 @@ -#page { - -fx-background-color: #000000; -} - -#browse { - -fx-text-fill: white; - -fx-pref-width: 62; - -fx-pref-height: 25; - -fx-background-color: #009900; -} - -#browse:hover { - -fx-background-color: #00cc00; -} - -.button { - -fx-pref-height: 25; - -fx-pref-width: 150; - -fx-background-color: #009900; - -fx-text-fill: white; -} - -.button:hover { - -fx-background-color: #00cc00; - -fx-text-fill: white; -} - diff --git a/src/GUI/css/ShowKey.css b/src/GUI/css/ShowKey.css deleted file mode 100644 index 4be15e9..0000000 --- a/src/GUI/css/ShowKey.css +++ /dev/null @@ -1,3 +0,0 @@ -#showKey { - -fx-background-color: #000000; -} \ No newline at end of file diff --git a/src/GUI/css/SideMenu.css b/src/GUI/css/SideMenu.css deleted file mode 100644 index 05c1f07..0000000 --- a/src/GUI/css/SideMenu.css +++ /dev/null @@ -1,3 +0,0 @@ -#menu { - -fx-background-color: #1a1a1a; -} \ No newline at end of file diff --git a/src/GUI/css/TextArea.css b/src/GUI/css/TextArea.css deleted file mode 100644 index 9f82b4f..0000000 --- a/src/GUI/css/TextArea.css +++ /dev/null @@ -1,7 +0,0 @@ -.text-area { - -fx-background: #009900; - -fx-text-fill: white; - -fx-control-inner-background: #1a1a1a; - -fx-highlight-fill: #009900; - -} \ No newline at end of file diff --git a/src/GUI/css/UserKey.css b/src/GUI/css/UserKey.css deleted file mode 100644 index 454bbc0..0000000 --- a/src/GUI/css/UserKey.css +++ /dev/null @@ -1,3 +0,0 @@ -#userKey { - -fx-background-color: #000000; -} \ No newline at end of file diff --git a/src/GUI/fxml/AboutPage.fxml b/src/GUI/fxml/AboutPage.fxml deleted file mode 100644 index 0a15502..0000000 --- a/src/GUI/fxml/AboutPage.fxml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/GUI/fxml/FileEncryptionPage.fxml b/src/GUI/fxml/FileEncryptionPage.fxml deleted file mode 100644 index 3f8058e..0000000 --- a/src/GUI/fxml/FileEncryptionPage.fxml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/GUI/fxml/FileHashPage.fxml b/src/GUI/fxml/FileHashPage.fxml deleted file mode 100644 index 8d2a964..0000000 --- a/src/GUI/fxml/FileHashPage.fxml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/GUI/fxml/HashSumCheckerPage.fxml b/src/GUI/fxml/HashSumCheckerPage.fxml deleted file mode 100644 index 05c4019..0000000 --- a/src/GUI/fxml/HashSumCheckerPage.fxml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/GUI/fxml/MenuBar.fxml b/src/GUI/fxml/MenuBar.fxml deleted file mode 100644 index 947048f..0000000 --- a/src/GUI/fxml/MenuBar.fxml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/GUI/fxml/SettingsPage.fxml b/src/GUI/fxml/SettingsPage.fxml deleted file mode 100644 index 6f36957..0000000 --- a/src/GUI/fxml/SettingsPage.fxml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - diff --git a/src/GUI/fxml/ShowKey.fxml b/src/GUI/fxml/ShowKey.fxml deleted file mode 100644 index c3de453..0000000 --- a/src/GUI/fxml/ShowKey.fxml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/GUI/fxml/SideMenu.fxml b/src/GUI/fxml/SideMenu.fxml deleted file mode 100644 index 810c063..0000000 --- a/src/GUI/fxml/SideMenu.fxml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/src/GUI/fxml/TextEncryptionPage.fxml b/src/GUI/fxml/TextEncryptionPage.fxml deleted file mode 100644 index 1db5c8a..0000000 --- a/src/GUI/fxml/TextEncryptionPage.fxml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/GUI/fxml/TextHashPage.fxml b/src/GUI/fxml/TextHashPage.fxml deleted file mode 100644 index bda6918..0000000 --- a/src/GUI/fxml/TextHashPage.fxml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -