-
Notifications
You must be signed in to change notification settings - Fork 0
/
bacon.h
66 lines (49 loc) · 872 Bytes
/
bacon.h
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
* `bacon.h' - libbacon
*
* copyright (c) 2014 joseph werle <[email protected]>
*/
#ifndef BACON_H
#define BACON_H 1
#if __GNUC__ >= 4
# define BACON_EXTERN __attribute__((visibility("default")))
#else
# define BACON_EXTERN
#endif
/**
* Bacon version
*/
#ifndef BACON_VERSION
#define BACON_VERSION "1" // default
#endif
/**
* Bacon alphabet
*/
#ifndef BACON_ALPHA
#define BACON_ALPHA "ABCDEFGHIKLMNOPQRSTUWXYZ"
#endif
/**
* Bacon 0 binary char
*/
#ifndef BACON_A
#define BACON_A 'A'
#endif
/**
* Bacon 1 binary char
*/
#ifndef BACON_B
#define BACON_B 'B'
#endif
/**
* Encodes a string with baconian cipher
* using an alphabet
*/
BACON_EXTERN char *
bacon_encode (const char *, const char *);
/**
* Decodes a string with baconian cipher
* using an alphabet
*/
BACON_EXTERN char *
bacon_decode (const char *, const char *);
#endif