Removing dusty comments
This commit is contained in:
parent
77ec404de6
commit
2aaa1e7a66
@ -7,9 +7,9 @@
|
||||
#include "node.h"
|
||||
|
||||
void welcome(){
|
||||
print_info("----------------------------------------");
|
||||
print_info("----------------------------------------------------------------------");
|
||||
print_info(" 大 字 报");
|
||||
print_info("----------------------------------------");
|
||||
print_info("-----------------------------------------------------------------------");
|
||||
print_info(">> To write a message, just write it to the terminal and press enter.");
|
||||
print_info(">> To show all messages, just press enter without writing anything.");
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include "node.h"
|
||||
|
||||
|
||||
#define DEBUG_LEVEL 7
|
||||
|
||||
void welcome();
|
||||
|
32
src/hash.c
32
src/hash.c
@ -3,13 +3,6 @@
|
||||
|
||||
// Hash a single data
|
||||
void hash_data(pub_data *data, unsigned char *buf) {
|
||||
/*
|
||||
data->length = 52 - 26;
|
||||
data->id = 34538;
|
||||
data->seqno = 4864;
|
||||
data->data = "Luke, je suis ton \"pair\" !";
|
||||
printf("Hash received: 9ffe841a99776f6d1295ac75b53a58d7\n");
|
||||
*/
|
||||
|
||||
// All three fields are concatenated into a single buffer
|
||||
int totlen = data->length + 10;
|
||||
@ -27,13 +20,6 @@ void hash_data(pub_data *data, unsigned char *buf) {
|
||||
// Put truncated hash into buf
|
||||
hash_trunc(hash, buf);
|
||||
|
||||
/*
|
||||
printf("Hash built: ");
|
||||
for(int i = 0; i < 16; i++) {
|
||||
printf("%02x", buf[i]);
|
||||
}
|
||||
printf("\n");
|
||||
*/
|
||||
}
|
||||
|
||||
// Hash every data contained in data_list then return a network hash
|
||||
@ -90,24 +76,6 @@ void concat_data(pub_data *data, unsigned char *buf) {
|
||||
if (memcpy(buf+10, data->data, data->length) == NULL) {
|
||||
print_debug(">> Contact the data (data) didn't work !");
|
||||
}
|
||||
|
||||
/*
|
||||
uint64_t *id = (uint64_t *) buf;
|
||||
uint16_t *seqno2 = (uint16_t *) (buf + 8);
|
||||
char *message = (char*) (buf + 10);
|
||||
char fuck[100];
|
||||
|
||||
printf("id: %ld\nseqno: %d\nmessage: ", *id, *seqno2);
|
||||
for(int i = 0; i < data->length; i++) {
|
||||
printf("%c", message[i]);
|
||||
}
|
||||
printf("\nORIGINAL\n");
|
||||
printf("id: %ld\nseqno: %d\nmessage: ", data->id, htobe16(data->seqno));
|
||||
for(int i = 0; i < data->length; i++) {
|
||||
printf("%c", data->data[i]);
|
||||
}
|
||||
printf("\n");
|
||||
*/
|
||||
}
|
||||
|
||||
// Concat hash2 to hash1 (hash1 is modified)
|
||||
|
BIN
src/énoncé.pdf
BIN
src/énoncé.pdf
Binary file not shown.
Loading…
Reference in New Issue
Block a user