implemented padding rate in all why2_input_flags usages
This commit is contained in:
parent
10edcdeccf
commit
d0e6d794e0
@ -23,7 +23,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
//SET FLAGS
|
//SET FLAGS
|
||||||
why2_set_flags((why2_input_flags) { 1, 1, 0, WHY2_v4, WHY2_OUTPUT_TEXT });
|
why2_set_flags((why2_input_flags) { 1, 1, 0, WHY2_v4, WHY2_OUTPUT_TEXT, 0 });
|
||||||
|
|
||||||
//RUN ENCRYPTION WITH WHY2_TEXT_TO_ENCRYPT, GENERATE NEW KEY AND DO NOT CHECK FOR ACTIVE WHY2_VERSION & PREVENT ANY OUTPUT
|
//RUN ENCRYPTION WITH WHY2_TEXT_TO_ENCRYPT, GENERATE NEW KEY AND DO NOT CHECK FOR ACTIVE WHY2_VERSION & PREVENT ANY OUTPUT
|
||||||
why2_output_flags encryptedText = why2_encrypt_text(WHY2_TEXT_TO_ENCRYPT, NULL);
|
why2_output_flags encryptedText = why2_encrypt_text(WHY2_TEXT_TO_ENCRYPT, NULL);
|
||||||
|
@ -25,7 +25,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||||||
#include <why2/memory.h>
|
#include <why2/memory.h>
|
||||||
|
|
||||||
//CONSTS (this is just local)
|
//CONSTS (this is just local)
|
||||||
#define DEFAULT_FLAGS (why2_input_flags) { 0, 0, 0, WHY2_v4, WHY2_OUTPUT_TEXT }
|
#define DEFAULT_FLAGS (why2_input_flags) { 0, 0, 0, WHY2_v4, WHY2_OUTPUT_TEXT, 64 }
|
||||||
#define DEFAULT_MEMORY_IDENTIFIER ""
|
#define DEFAULT_MEMORY_IDENTIFIER ""
|
||||||
|
|
||||||
int encryptionOperation(int text, int encryptedText);
|
int encryptionOperation(int text, int encryptedText);
|
||||||
|
@ -45,7 +45,8 @@ int main(void)
|
|||||||
0, //NO OUTPUT
|
0, //NO OUTPUT
|
||||||
0, //UPDATE
|
0, //UPDATE
|
||||||
WHY2_v4, //LATEST VERSION
|
WHY2_v4, //LATEST VERSION
|
||||||
WHY2_OUTPUT_TEXT //READABLE TEXT OUTPUT
|
WHY2_OUTPUT_TEXT, //READABLE TEXT OUTPUT
|
||||||
|
255 //PADDING RATE
|
||||||
};
|
};
|
||||||
|
|
||||||
//SET FLAGS
|
//SET FLAGS
|
||||||
|
@ -17,7 +17,8 @@ int main(void)
|
|||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
WHY2_v4,
|
WHY2_v4,
|
||||||
WHY2_OUTPUT_TEXT
|
WHY2_OUTPUT_TEXT,
|
||||||
|
0
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ void why2_write_log(int loggerFile, char *logMessage)
|
|||||||
why2_log_flags flags = why2_get_log_flags();
|
why2_log_flags flags = why2_get_log_flags();
|
||||||
|
|
||||||
//SET ENCRYPTER FLAGS
|
//SET ENCRYPTER FLAGS
|
||||||
if (!why2_get_flags_changed()) why2_set_flags((why2_input_flags) { 0, 1, 0, WHY2_v4, WHY2_OUTPUT_TEXT });
|
if (!why2_get_flags_changed()) why2_set_flags((why2_input_flags) { 0, 1, 0, WHY2_v4, WHY2_OUTPUT_TEXT, 63 });
|
||||||
|
|
||||||
if (flags.key != NULL) //ENCRYPT TEXT IF KEY WAS CHANGED
|
if (flags.key != NULL) //ENCRYPT TEXT IF KEY WAS CHANGED
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user