diff --git a/src/base128.c b/src/base128.c index 98784a3..7255c0f 100644 --- a/src/base128.c +++ b/src/base128.c @@ -60,7 +60,7 @@ static size_t base128_blksize_enc(); static size_t base128_encoded_length(size_t inputlen); static size_t base128_raw_length(size_t inputlen); -static struct encoder base128_encoder = +struct encoder base128_encoder = { "Base128", base128_encode, @@ -73,6 +73,8 @@ static struct encoder base128_encoder = base128_raw_length }; +struct encoder *b128 = &base128_encoder; + struct encoder *get_base128_encoder() { diff --git a/src/base128.h b/src/base128.h index f4c55f6..9235e62 100644 --- a/src/base128.h +++ b/src/base128.h @@ -17,6 +17,9 @@ #ifndef __BASE128_H__ #define __BASE128_H__ +extern struct encoder base128_encoder; +extern struct encoder *b128; + struct encoder *get_base128_encoder(void); #endif diff --git a/src/base32.c b/src/base32.c index ccb2133..86191ac 100644 --- a/src/base32.c +++ b/src/base32.c @@ -42,7 +42,7 @@ static size_t base32_encoded_length(size_t inputlen); static size_t base32_raw_length(size_t inputlen); -static struct encoder base32_encoder = +struct encoder base32_encoder = { "Base32", base32_encode, @@ -55,6 +55,8 @@ static struct encoder base32_encoder = base32_raw_length }; +struct encoder *b32 = &base32_encoder; + struct encoder *get_base32_encoder() { diff --git a/src/base32.h b/src/base32.h index 83ba784..3676564 100644 --- a/src/base32.h +++ b/src/base32.h @@ -18,6 +18,9 @@ #ifndef __BASE32_H__ #define __BASE32_H__ +extern struct encoder base32_encoder; +extern struct encoder *b32; + struct encoder *get_base32_encoder(void); int b32_5to8(int); diff --git a/src/base64.c b/src/base64.c index fb189e3..570120b 100644 --- a/src/base64.c +++ b/src/base64.c @@ -41,7 +41,7 @@ static size_t base64_blksize_enc(); static size_t base64_encoded_length(size_t inputlen); static size_t base64_raw_length(size_t inputlen); -static struct encoder base64_encoder = +struct encoder base64_encoder = { "Base64", base64_encode, @@ -54,6 +54,8 @@ static struct encoder base64_encoder = base64_raw_length }; +struct encoder *b64 = &base64_encoder; + struct encoder *get_base64_encoder() { diff --git a/src/base64.h b/src/base64.h index 8ce4742..6ed5aaa 100644 --- a/src/base64.h +++ b/src/base64.h @@ -18,6 +18,9 @@ #ifndef __BASE64_H__ #define __BASE64_H__ +extern struct encoder base64_encoder; +extern struct encoder *b64; + struct encoder *get_base64_encoder(void); #endif