diff --git a/include/crypto.h b/include/crypto.h index 2d34173..ee61dd0 100644 --- a/include/crypto.h +++ b/include/crypto.h @@ -28,7 +28,7 @@ extern "C" { #define WHY2_CHECKSUM_PRIME 11 //PRIME NUMBER FOR ROTATION //FUNCTIONS -unsigned long why2_checksum_segment(char *input); //TOO LONG TO EXPLAIN, DEAL WITH IT. TREAT IT LIKE A NORMAL CHECKSUM +unsigned long why2_sum_segment(char *input); //TOO LONG TO EXPLAIN, DEAL WITH IT. TREAT IT LIKE A NORMAL CHECKSUM #ifdef __cplusplus } diff --git a/src/core/lib/utils/crypto.c b/src/core/lib/utils/crypto.c index 64cc63a..852eac9 100644 --- a/src/core/lib/utils/crypto.c +++ b/src/core/lib/utils/crypto.c @@ -21,7 +21,7 @@ along with this program. If not, see . #include #include -unsigned long why2_checksum_segment(char *input) //I ABSOLUTELY DO NOT RECOMMEND USING THIS WITH LARGE KEYS!!! +unsigned long why2_sum_segment(char *input) //I ABSOLUTELY DO NOT RECOMMEND USING THIS WITH LARGE KEYS!!! { unsigned long input_size = strlen(input); unsigned long segmented_input_size = ceil(input_size / (double) WHY2_CHECKSUM_SEGMENT_SIZE) * WHY2_CHECKSUM_SEGMENT_SIZE; //CALCULATE CLOSEST 4*n TO input