88import java .security .spec .InvalidKeySpecException ;
99
1010/**
11- * -s <128 | 192 | 256> specify the size of the key with one of the shown value. \n" +
12- * Default is 128. \n" +
13- * -fiv <FILELOCATION> specify the hexadecimal file where specified VI islocated \n" +
14- * -p <PASS:SALT> specify a password for encryption/decryption with the specified PASS and SALT \n" +
15- * -k <KEYFILELOCATION> specify location for setting a specific Base64 encoded key \n" +
16- * -a <CBS|CFB|OFB|CTR|GCM> choose alghorithm type \n" +
17- * Default is CBS \n" +
18- * -wiv <FILENAME> Creates a file with the latest VI used or the specified one if there is. \n" +
19- * -wk <FILENAME> Creates a file with the latest Key Encoded value used or the specified one if there is. \n" +
20- * -i <FILENAME> Input file encrypted/decrypted or physical file to encrypt/decrypt. \n" +
21- * -o <FILENAME> Output file to specify if you want to encrypt/decrypt an entire physical file or \n" +
22- * where you want to save encrypted/decrypted content. \n" +
23- * -v Set verbose to true \n" +
11+ * -s <128 | 192 | 256> specify the size of the key with one of the shown value.
12+ * Default is 128.
13+ * -fiv <FILELOCATION> specify the hexadecimal file where specified VI islocated
14+ * -p <PASS:SALT> specify a password for encryption/decryption with the specified PASS and SALT
15+ * -k <KEYFILELOCATION> specify location for setting a specific Base64 encoded key
16+ * -a <CBS|CFB|OFB|CTR|GCM> choose alghorithm type
17+ * Default is CBS
18+ * -wiv <FILENAME> Creates a file with the latest VI used or the specified one if there is.
19+ * -wk <FILENAME> Creates a file with the latest Key Encoded value used or the specified one if there is.
20+ * -i <FILENAME> Input file encrypted/decrypted or physical file to encrypt/decrypt.
21+ * -o <FILENAME> Output file to specify if you want to encrypt/decrypt an entire physical file or
22+ * where you want to save encrypted/decrypted content.
23+ * -v Set verbose to true
2424 * Default is set to false
25- */
25+ ** /
2626public interface SimmetricEncryption extends Encryption {
2727 /**
2828 * The method can be used to set a password to encrypt data
@@ -43,16 +43,49 @@ public interface SimmetricEncryption extends Encryption {
4343 */
4444 void setIv (String iv );
4545
46+ /**
47+ * Write Iv Generated (Or set with setIv method) in a file.
48+ *
49+ * @param file
50+ * @throws IOException
51+ */
4652 void writeIv (File file ) throws IOException ;
4753
54+ /**
55+ * Write Key Generated (Or set with setKey method) in a file.
56+ *
57+ * @param file
58+ * @throws IOException
59+ */
4860 void writeKey (File file ) throws IOException ;
4961
62+ /**
63+ * Set size with the generated key which will be used when encrypting/decrypting.
64+ *
65+ * @param size
66+ */
5067 void setSize (int size );
5168
69+ /**
70+ * Set algorithm default: AES/CBC/PKCS5Padding
71+ * Replace CBS with CFB OR OFB OR CTR OR GCM.
72+ *
73+ * @param algo
74+ */
5275 void setAlgo (String algo );
5376
77+ /**
78+ * Get the generated IV or setted IV as a string of bytes
79+ *
80+ * @return
81+ */
5482 String getIV ();
5583
84+ /**
85+ * Get the generated key as Base64 encoded String value.
86+ *
87+ * @return
88+ */
5689 String getKey ();
5790
5891 /**
@@ -61,4 +94,5 @@ public interface SimmetricEncryption extends Encryption {
6194 * @param password set the encoded password for the AES cipher
6295 */
6396 void setKey (String password );
97+
6498}
0 commit comments