1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#ifndef __CRYPTO_LIB__
#define __CRYPTO_LIB__
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
struct key_and_freq {
char key;
int hits;
};
void print_char_bit(char);
void xor_string(char *str1, char *key, char *result, int length_key, int length_str1);
void hex_binary_to_string(char *str1, char *result, int length);
int decode_hex_string(char *encode, char* result);
void encode_to_base64(char *encode, char *result);
int decode_base64(char *string1, char *result);
void print_base64_string(char *string);
int hamming_distance_equal_length(char *string1, char *string2, int length);
char brute_force_single_byte_xor(char *string, int length, struct key_and_freq *tmp);
int isprintable(char *string, int length);
#endif /* __CYRPTO_LIB__ */
|