@@ -75,7 +75,7 @@ public static void main(String[] args) throws Exception {
7575
7676 /**
7777 * Encrypts a plain text input file by outputing an encrypted version. It does this
78- * generating a 128 bit secret key and initialisation vector which are used as
78+ * generating a 128 bit secret key and initialisation vector which are used as the
7979 * specifications during the file encryption process.
8080 *
8181 * @param inputPath - A String specifying the Input path of the plaintext file
@@ -101,7 +101,7 @@ public static void encrypt(String inputPath, String outputPath) throws NoSuchAlg
101101 System .out .println ("IV is: " + Base64 .getEncoder ().encodeToString (initVector ));
102102 System .out .print ("<---------------------------------------->\n \n " );
103103
104- // Initialize Key and Vector Specfications and the Cipher mode
104+ // Initialize Key, Vector Specfications and the Cipher mode
105105 IvParameterSpec iv = new IvParameterSpec (initVector );
106106 SecretKeySpec skeySpec = new SecretKeySpec (key , ALGORITHM );
107107 Cipher cipher = Cipher .getInstance (CIPHER );
@@ -177,7 +177,7 @@ public static void decrypt(byte[] key, byte[] initVector, String inputPath, Stri
177177 cipher .init (Cipher .DECRYPT_MODE , skeySpec , iv );
178178
179179 File outputFile = new File (outputPath );
180- // Create a new Decrypted file if it doesn't exist
180+ // Create a new Output file if it doesn't exist
181181 if (!outputFile .exists ()) { outputFile .createNewFile (); }
182182
183183 final Path encryptedFile = Paths .get (inputPath );
@@ -186,7 +186,7 @@ public static void decrypt(byte[] key, byte[] initVector, String inputPath, Stri
186186 if (writeDecryptedFile (encryptedFile , decryptedFile , cipher )) {
187187 LOG .info ("Decryption complete, open " + decryptedFile );
188188 } else {
189- LOG .log (Level .SEVERE , "Ensure the correct Key, Vector, and Files pahts are specified" );
189+ LOG .log (Level .SEVERE , "Ensure the correct Key, Vector, and Files paths are specified" );
190190 }
191191 }
192192
0 commit comments