diff options
Diffstat (limited to 'other/DHT_bootstrap.c')
-rw-r--r-- | other/DHT_bootstrap.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/other/DHT_bootstrap.c b/other/DHT_bootstrap.c index 19714e70..befe2225 100644 --- a/other/DHT_bootstrap.c +++ b/other/DHT_bootstrap.c | |||
@@ -79,12 +79,20 @@ int main(int argc, char *argv[]) | |||
79 | manage_keys(); | 79 | manage_keys(); |
80 | printf("Public key: "); | 80 | printf("Public key: "); |
81 | uint32_t i; | 81 | uint32_t i; |
82 | |||
83 | FILE *file; | ||
84 | file = fopen("PUBLIC_ID.txt", "w"); | ||
85 | |||
82 | for(i = 0; i < 32; i++) | 86 | for(i = 0; i < 32; i++) |
83 | { | 87 | { |
84 | if(self_public_key[i] < 16) | 88 | if(self_public_key[i] < 16) |
85 | printf("0"); | 89 | printf("0"); |
86 | printf("%hhX",self_public_key[i]); | 90 | printf("%hhX",self_public_key[i]); |
91 | fprintf(file, "%hhX",self_public_key[i]); | ||
87 | } | 92 | } |
93 | |||
94 | fclose(file); | ||
95 | |||
88 | printf("\n"); | 96 | printf("\n"); |
89 | printf("Port: %u\n", PORT); | 97 | printf("Port: %u\n", PORT); |
90 | //initialize networking | 98 | //initialize networking |