diff --git a/include/chat/crypto.h b/include/chat/crypto.h index 4ee5cdd..86ad7ec 100644 --- a/include/chat/crypto.h +++ b/include/chat/crypto.h @@ -35,6 +35,8 @@ extern "C" { #define WHY2_CHAT_PRI_KEY "pri" #define WHY2_CHAT_KEY_BASE 62 //BASE IN THE GENERATED KEYS ARE STORED IN WHY2_CHAT_KEY_LOCATION +#define WHY2_CHECKSUM_SEGMENT_SIZE 4 + void why2_chat_init_keys(void); //INIT (POSSIBLY GENERATE) RSA KEYS void why2_chat_deallocate_keys(void); //DEALLOCATE :) (NO SLUR HERE) @@ -46,6 +48,8 @@ char *why2_chat_rsa_pri_decrypt(char *to_decrypt); //RSA DECRYPT USING PRIVATE K char *why2_sha256(char *input); //HASH input USING SHA256 AND RETURN IN STRING +unsigned long why2_checksum_segment(char *input); //TOO LONG TO EXPLAIN, DEAL WITH IT. TREAT IT LIKE A NORMAL CHECKSUM + #ifdef __cplusplus } #endif