Modes of Operation

Based on the value specified for the argument MODE, the utility can be operated in different modes:

MODE set as genkey

./dmtfileencryption.sh genkey <KEYFILE>

In this mode, utility takes the absolute path to which key has to be written as input. Creates a 256 bit AES key and writes to the location given in <KEYFILE> attribute.

MODE set as encrypt_file

./dmtfileencryption.sh encrypt_file <INPUTFILE> <OUTPUTFILE> <KEYFILE>

In this mode, utility takes input file path, output file path and key file path as inputs. Using the 256 bit AES key in the given key path, input file is encrypted and written into given output file path.

MODE set as decrypt_file

./dmtfileencryption.sh decrypt_file <INPUTFILE> <OUTPUTFILE> <KEYFILE>

In this mode, utility takes input file path, output file path and key file path as inputs. Using the 256 bit AES key in the given key path, input file is decrypted and written into given output file path.

Note:

Input and output file absolute paths should be different