From 0fe3f47752c574c317da8dbb9db53af9a101212a Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sun, 12 Jan 2025 13:12:50 +0100 Subject: [PATCH] added why2_set_padding fn sets padding without messing with flags --- include/flags.h | 2 ++ src/core/lib/flags.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/include/flags.h b/include/flags.h index d65cd1b..d15a9f4 100644 --- a/include/flags.h +++ b/include/flags.h @@ -113,6 +113,8 @@ void why2_set_key_length(int keyLengthNew); void why2_set_flags(why2_input_flags newFlags); //.... whatcha think? void why2_set_encryption_operation(why2_encryption_operation_cb newEncryptionOperation); //are you that dumb? void why2_set_memory_identifier(char *new_memory_identifier); +void why2_set_padding(unsigned long padding); //SET PADDING RATE WITHOUT REWRITING INPUT FLAGS + void why2_reset_memory_identifier(void); //hmmm, what could reset mean.... huh #ifdef __cplusplus diff --git a/src/core/lib/flags.c b/src/core/lib/flags.c index 7d68b56..32850d6 100644 --- a/src/core/lib/flags.c +++ b/src/core/lib/flags.c @@ -145,6 +145,11 @@ void why2_set_memory_identifier(char *new_memory_identifier) memory_identifier = new_memory_identifier; } +void why2_set_padding(unsigned long padding) +{ + flagsAllah.padding = padding; +} + void why2_reset_memory_identifier(void) { why2_list_remove_back(&identifier_list);