Skip to content

Commit 8177d2b

Browse files
committed
docs: info method documentation added
1 parent f59a3c2 commit 8177d2b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/FileEncryptor.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,22 @@ private static boolean writeDecryptedFile(Path inputPath, Path outputPath, char[
357357
return true;
358358
}
359359

360+
/**
361+
* Allows the user to query metadata for a given file path. The file path
362+
* specified must point to an encrypted file with a .enc extension The metadata
363+
* for the file must also follow a specific format as shown below.
364+
* Metadata format:
365+
* int BLOCKSIZE
366+
* int KEY LENGTH (in bytes)
367+
* int Algorithm Length
368+
* byte[] Algorithm name
369+
* byte[] IV
370+
* byte[] Salt
371+
* byte[] MacSalt
372+
* byte[] Computed Mac
373+
*
374+
* @param String filepath The file being requested to be display the metadata
375+
*/
360376
private static void info(String filepath) {
361377
if (!filepath.contains(".enc")) { throw new IllegalArgumentException("Invalid file requested must be an encrypted file e.g. encrypted.enc"); }
362378

0 commit comments

Comments
 (0)