libflint/include/lfcrypto.h

20 lines
747 B
C
Raw Normal View History

2024-03-28 22:19:05 +00:00
#ifndef LIBFLINT_CRYPTO_H
#define LIBFLINT_CRYPTO_H
#include <stddef.h>
2024-03-29 02:09:39 +00:00
const char *b64_encode(const unsigned char *s, size_t sz);
2024-03-28 22:19:05 +00:00
unsigned char *b64_decode(const char *s, size_t sz, size_t *decode_sz);
2024-03-29 14:18:01 +00:00
2024-03-29 02:09:39 +00:00
const char *hex_encode(const unsigned char *hex, size_t sz);
2024-03-29 01:30:27 +00:00
unsigned char *hex_decode(const char *orig, size_t *sz);
2024-03-29 14:18:01 +00:00
const char *hex_to_str(const unsigned char *hex, size_t sz);
2024-03-28 22:19:05 +00:00
2024-04-09 17:47:34 +00:00
const unsigned char* repeating_key_xor(const unsigned char* s, size_t s_sz, const unsigned char* key, size_t k_sz);
const unsigned char *repeating_key_xor_s(const char* s, const char* key);
2024-05-06 00:05:12 +00:00
unsigned int hamming_distance_s(const char *a, const char *b);
unsigned int hamming_distance(unsigned char *a, unsigned char *b, size_t sz);
2024-05-04 18:35:54 +00:00
2024-03-28 22:19:05 +00:00
#endif // LIBFLINT_CRYPTO_H