ffi-hydrogen 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +13 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +30 -0
  5. data/.travis.yml +10 -0
  6. data/Gemfile +6 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +72 -0
  9. data/Rakefile +46 -0
  10. data/bench/both.rb +86 -0
  11. data/bench/encode.rb +57 -0
  12. data/bench/encrypt.rb +80 -0
  13. data/bench/init.rb +5 -0
  14. data/bin/console +14 -0
  15. data/bin/setup +8 -0
  16. data/ffi-hydrogen.gemspec +31 -0
  17. data/lib/ffi/hydrogen.rb +216 -0
  18. data/vendor/.clang-format +2 -0
  19. data/vendor/.gitignore +3 -0
  20. data/vendor/README.md +2 -0
  21. data/vendor/libhydrogen/.clang-format +95 -0
  22. data/vendor/libhydrogen/.gitignore +32 -0
  23. data/vendor/libhydrogen/.travis.yml +22 -0
  24. data/vendor/libhydrogen/LICENSE +18 -0
  25. data/vendor/libhydrogen/Makefile +61 -0
  26. data/vendor/libhydrogen/Makefile.arduino +51 -0
  27. data/vendor/libhydrogen/README.md +29 -0
  28. data/vendor/libhydrogen/hydrogen.c +18 -0
  29. data/vendor/libhydrogen/hydrogen.h +317 -0
  30. data/vendor/libhydrogen/impl/common.h +316 -0
  31. data/vendor/libhydrogen/impl/core.h +220 -0
  32. data/vendor/libhydrogen/impl/gimli-core/portable.h +39 -0
  33. data/vendor/libhydrogen/impl/gimli-core/sse2.h +97 -0
  34. data/vendor/libhydrogen/impl/gimli-core.h +25 -0
  35. data/vendor/libhydrogen/impl/hash.h +138 -0
  36. data/vendor/libhydrogen/impl/hydrogen_p.h +83 -0
  37. data/vendor/libhydrogen/impl/kdf.h +20 -0
  38. data/vendor/libhydrogen/impl/kx.h +441 -0
  39. data/vendor/libhydrogen/impl/pwhash.h +281 -0
  40. data/vendor/libhydrogen/impl/random.h +376 -0
  41. data/vendor/libhydrogen/impl/secretbox.h +236 -0
  42. data/vendor/libhydrogen/impl/sign.h +207 -0
  43. data/vendor/libhydrogen/impl/x25519.h +383 -0
  44. data/vendor/libhydrogen/library.properties +10 -0
  45. data/vendor/libhydrogen/logo.png +0 -0
  46. data/vendor/libhydrogen/tests/tests.c +431 -0
  47. data/vendor/main.c +140 -0
  48. data/vendor/stringencoders/.gitignore +25 -0
  49. data/vendor/stringencoders/.travis.yml +13 -0
  50. data/vendor/stringencoders/AUTHORS +1 -0
  51. data/vendor/stringencoders/COPYING +2 -0
  52. data/vendor/stringencoders/ChangeLog +170 -0
  53. data/vendor/stringencoders/Doxyfile +276 -0
  54. data/vendor/stringencoders/INSTALL +119 -0
  55. data/vendor/stringencoders/LICENSE +22 -0
  56. data/vendor/stringencoders/Makefile.am +3 -0
  57. data/vendor/stringencoders/NEWS +3 -0
  58. data/vendor/stringencoders/README +2 -0
  59. data/vendor/stringencoders/README.md +32 -0
  60. data/vendor/stringencoders/bootstrap.sh +3 -0
  61. data/vendor/stringencoders/configure-gcc-hardened.sh +16 -0
  62. data/vendor/stringencoders/configure.ac +44 -0
  63. data/vendor/stringencoders/doxy/footer.html +34 -0
  64. data/vendor/stringencoders/doxy/header.html +85 -0
  65. data/vendor/stringencoders/indent.sh +9 -0
  66. data/vendor/stringencoders/javascript/base64-speed.html +43 -0
  67. data/vendor/stringencoders/javascript/base64-test.html +209 -0
  68. data/vendor/stringencoders/javascript/base64.html +18 -0
  69. data/vendor/stringencoders/javascript/base64.js +176 -0
  70. data/vendor/stringencoders/javascript/qunit.css +119 -0
  71. data/vendor/stringencoders/javascript/qunit.js +1062 -0
  72. data/vendor/stringencoders/javascript/urlparse-test.html +367 -0
  73. data/vendor/stringencoders/javascript/urlparse.js +328 -0
  74. data/vendor/stringencoders/make-ci.sh +13 -0
  75. data/vendor/stringencoders/makerelease.sh +16 -0
  76. data/vendor/stringencoders/python/b85.py +176 -0
  77. data/vendor/stringencoders/src/Makefile.am +134 -0
  78. data/vendor/stringencoders/src/arraytoc.c +85 -0
  79. data/vendor/stringencoders/src/arraytoc.h +43 -0
  80. data/vendor/stringencoders/src/extern_c_begin.h +3 -0
  81. data/vendor/stringencoders/src/extern_c_end.h +3 -0
  82. data/vendor/stringencoders/src/html_named_entities_generator.py +203 -0
  83. data/vendor/stringencoders/src/modp_ascii.c +159 -0
  84. data/vendor/stringencoders/src/modp_ascii.h +162 -0
  85. data/vendor/stringencoders/src/modp_ascii_data.h +84 -0
  86. data/vendor/stringencoders/src/modp_ascii_gen.c +55 -0
  87. data/vendor/stringencoders/src/modp_b16.c +125 -0
  88. data/vendor/stringencoders/src/modp_b16.h +148 -0
  89. data/vendor/stringencoders/src/modp_b16_data.h +104 -0
  90. data/vendor/stringencoders/src/modp_b16_gen.c +65 -0
  91. data/vendor/stringencoders/src/modp_b2.c +69 -0
  92. data/vendor/stringencoders/src/modp_b2.h +130 -0
  93. data/vendor/stringencoders/src/modp_b2_data.h +44 -0
  94. data/vendor/stringencoders/src/modp_b2_gen.c +36 -0
  95. data/vendor/stringencoders/src/modp_b36.c +108 -0
  96. data/vendor/stringencoders/src/modp_b36.h +170 -0
  97. data/vendor/stringencoders/src/modp_b64.c +254 -0
  98. data/vendor/stringencoders/src/modp_b64.h +236 -0
  99. data/vendor/stringencoders/src/modp_b64_data.h +477 -0
  100. data/vendor/stringencoders/src/modp_b64_gen.c +168 -0
  101. data/vendor/stringencoders/src/modp_b64r.c +254 -0
  102. data/vendor/stringencoders/src/modp_b64r.h +242 -0
  103. data/vendor/stringencoders/src/modp_b64r_data.h +477 -0
  104. data/vendor/stringencoders/src/modp_b64w.c +254 -0
  105. data/vendor/stringencoders/src/modp_b64w.h +231 -0
  106. data/vendor/stringencoders/src/modp_b64w_data.h +477 -0
  107. data/vendor/stringencoders/src/modp_b85.c +109 -0
  108. data/vendor/stringencoders/src/modp_b85.h +171 -0
  109. data/vendor/stringencoders/src/modp_b85_data.h +36 -0
  110. data/vendor/stringencoders/src/modp_b85_gen.c +65 -0
  111. data/vendor/stringencoders/src/modp_bjavascript.c +65 -0
  112. data/vendor/stringencoders/src/modp_bjavascript.h +105 -0
  113. data/vendor/stringencoders/src/modp_bjavascript_data.h +84 -0
  114. data/vendor/stringencoders/src/modp_bjavascript_gen.c +58 -0
  115. data/vendor/stringencoders/src/modp_burl.c +228 -0
  116. data/vendor/stringencoders/src/modp_burl.h +259 -0
  117. data/vendor/stringencoders/src/modp_burl_data.h +136 -0
  118. data/vendor/stringencoders/src/modp_burl_gen.c +121 -0
  119. data/vendor/stringencoders/src/modp_html.c +128 -0
  120. data/vendor/stringencoders/src/modp_html.h +53 -0
  121. data/vendor/stringencoders/src/modp_html_named_entities.h +9910 -0
  122. data/vendor/stringencoders/src/modp_json.c +315 -0
  123. data/vendor/stringencoders/src/modp_json.h +103 -0
  124. data/vendor/stringencoders/src/modp_json_data.h +57 -0
  125. data/vendor/stringencoders/src/modp_json_gen.py +60 -0
  126. data/vendor/stringencoders/src/modp_mainpage.h +120 -0
  127. data/vendor/stringencoders/src/modp_numtoa.c +350 -0
  128. data/vendor/stringencoders/src/modp_numtoa.h +100 -0
  129. data/vendor/stringencoders/src/modp_qsiter.c +76 -0
  130. data/vendor/stringencoders/src/modp_qsiter.h +71 -0
  131. data/vendor/stringencoders/src/modp_stdint.h +43 -0
  132. data/vendor/stringencoders/src/modp_utf8.c +88 -0
  133. data/vendor/stringencoders/src/modp_utf8.h +38 -0
  134. data/vendor/stringencoders/src/modp_xml.c +311 -0
  135. data/vendor/stringencoders/src/modp_xml.h +166 -0
  136. data/vendor/stringencoders/src/stringencoders.pc +10 -0
  137. data/vendor/stringencoders/src/stringencoders.pc.in +10 -0
  138. data/vendor/stringencoders/test/Makefile.am +113 -0
  139. data/vendor/stringencoders/test/apr_base64.c +262 -0
  140. data/vendor/stringencoders/test/apr_base64.h +120 -0
  141. data/vendor/stringencoders/test/cxx_test.cc +482 -0
  142. data/vendor/stringencoders/test/minunit.h +82 -0
  143. data/vendor/stringencoders/test/modp_ascii_test.c +281 -0
  144. data/vendor/stringencoders/test/modp_b16_test.c +288 -0
  145. data/vendor/stringencoders/test/modp_b2_test.c +250 -0
  146. data/vendor/stringencoders/test/modp_b64_test.c +266 -0
  147. data/vendor/stringencoders/test/modp_b85_test.c +130 -0
  148. data/vendor/stringencoders/test/modp_bjavascript_test.c +137 -0
  149. data/vendor/stringencoders/test/modp_burl_test.c +423 -0
  150. data/vendor/stringencoders/test/modp_html_test.c +296 -0
  151. data/vendor/stringencoders/test/modp_json_test.c +336 -0
  152. data/vendor/stringencoders/test/modp_numtoa_test.c +545 -0
  153. data/vendor/stringencoders/test/modp_qsiter_test.c +280 -0
  154. data/vendor/stringencoders/test/modp_utf8_test.c +188 -0
  155. data/vendor/stringencoders/test/modp_xml_test.c +339 -0
  156. data/vendor/stringencoders/test/speedtest.c +241 -0
  157. data/vendor/stringencoders/test/speedtest_ascii.c +345 -0
  158. data/vendor/stringencoders/test/speedtest_msg.c +78 -0
  159. data/vendor/stringencoders/test/speedtest_numtoa.c +276 -0
  160. metadata +314 -0
@@ -0,0 +1,170 @@
1
+ ChangeLog
2
+ Yeah, I know this isn't quite the right format.
3
+
4
+ 22-Sep-2016
5
+ * Fix nasty rounding bug in dtoa functions
6
+ * Change license from New BSD to MIT
7
+ * Reformat whitespace
8
+ * Fix URLs and other documentation
9
+
10
+ 01-Nov-2013:
11
+ * Added new XML, HTML and UTF-8 functions
12
+ * Fixed warnings for latest compilers
13
+ * CHANGE: various functions return the amount of data consumed
14
+ instead of void
15
+
16
+ 06-Oct-2012:
17
+ * ADDED new modp_b64r which is a base64 encoding that follows RFC XYZ
18
+
19
+ 18-Mar-2012:
20
+ * ADDED new file/function: modp_qsiter memory-free query string key-value pair iterator
21
+
22
+ 25-Feb-2012:
23
+ * ADDED 'make valgrind' to run all tests through valgrind
24
+ * Fixed Issue 26 where uint64_t != unsigned long on some platforms. Thanks to ndivx
25
+ * Fixed Issue 21 valgrind complains on modp_b16 in some cases. Thanks calfeld@qualys.com
26
+ * Fixed Issue 18 copying versions of C++ functions tolower(), toupper(), toprint() modify original string, thanks ilya.m...@gmail.com
27
+
28
+ 23-Feb-2012
29
+ * Fixed bootstrap code on Mac OS 10.
30
+ * Fixed Issue 25 speedtest fails to compile with gcc 4.6+ -Wextra. Thanks to rakesh.pandit
31
+
32
+ 19-Mar-2010
33
+ * Added "modp_dtoa2" same as dtoa2 but strips trailing zeros (Issue 9)
34
+ * FIXED Issue 10 -- NaN not handled correctly in modp_dtoa(2).
35
+ * ADDED more tests for NaN/Inf handling
36
+ * FIXED some build issues under Ubuntu (64-bit) (sprintf annoyances in testing code)
37
+ * REGENERATED that autoconf stuff. Groan. Hopefully it works for you. If not
38
+ file a ticket, please!
39
+ * VERSION 3.10 RELEASED
40
+
41
+ 12-Feb-2010
42
+ * FIXED Issue 7 - silent overflow error
43
+ * FIXED Incorrect autoconf version
44
+ * Issue 6 -- attempt to make VS2008 happy
45
+ * VERSION 3.9 RELEASED
46
+
47
+
48
+ 05-Jan-2008
49
+ * Regenerated libtool/autoconf/autoheader/etc to fix
50
+ problem where ranlib was improperly being invoked on some systems
51
+ * Added "std::" to some raw "string" in C++ methods
52
+ * Added "#include <cstring>" to some headers for C++
53
+ * Tested with latest snapshot of gcc/g++ with -Wall -Wextra
54
+ * No logic changes
55
+ 20-Nov-2007
56
+ * modp_dtoa
57
+ Fixed round-to-even "rollovers" (e.g. 0.99, prec 1 -> 1.0)
58
+ Simplified "very small number" logic
59
+ Unit tests greatly improved.
60
+ thanks again to Johannes Otepka for finding bugs
61
+ * VERSION 3.6 RELEASED
62
+ 19-Nov-2007
63
+ * modp_dtoa
64
+ Fixed round-to-even, and precision 0 rules to match printf
65
+ thanks to Johannes Otepka
66
+ * VERSION 3.5 RELEASED
67
+
68
+ 27-Jun-2007
69
+ * VERSION 3.4 RELEASED
70
+
71
+ 21-Jun-2007
72
+ * Ugh. Fix bug in url decode where core dump can occur if someone passes in %XX, where X
73
+ has high bit set (> 0x80). Due to signed chars, this is interpreted as a negative, and
74
+ bad things happen. Thanks to Andrei Khemmelis.
75
+ * Improve more C++ methods, b64, b64w, b16 all have string, const string, const char* and
76
+ and (const char*, length) inputs now.
77
+ * Added "make help" to give list of options
78
+
79
+ 05-Jun-2007
80
+ * VERSION 3.3 RELEASED
81
+
82
+ 05-Jun-2007
83
+ * Fix bug in modp_b16_gen that could core dump (doesn't not effect output, only occurs
84
+ during building). Thanks to Constantine Verutin.
85
+
86
+ 04-Jun-2007
87
+ * toupper/lower now 2x faster than before! Based on an alogirthm by Hsieh
88
+ http://www.azillionmonkeys.com/qed/asmexample.html
89
+ * C++ added more C++ methods for url_decode
90
+
91
+ 24-May-2007
92
+ * Version 3.2 released
93
+ * Cleaned-up include guards, and 'extern c' stuff for C++.
94
+
95
+ 23-May-2007
96
+ * Add C++ "const" methods everywhere in case you don't want to
97
+ modify the original input
98
+
99
+ 15-May-2007
100
+ * Removed CuTest since it's crap and leaks memory.
101
+
102
+ 14-May-2007
103
+ * added modp_ascii -- ascii transformations (upper/lower/etc) --
104
+ 25x faster than ctype toupper,etc
105
+
106
+ 13-May-2007
107
+ * made b64_encode be about 30% faster on Intel based chip.
108
+ Minimal performance loss on AMD, G4
109
+ (now all platforms are faster than the apache encoder)
110
+ * added modp_b2 -- ascii binary string encode/decode
111
+
112
+ 22-Apr-2007
113
+ * Release 3.1
114
+ * fixes some compliation problems on 64-bit platforms
115
+ * add modp_numtoa, fast number to string conversions
116
+
117
+ 06-Apr-2007
118
+ * Release 3.0
119
+
120
+ 03-Mar-2007:
121
+ * initial import into google code
122
+
123
+ 02-Sep-2006
124
+ * New modp_64w which is the configurable base 64 alphabet.
125
+ The original modp_b64 will now be the standard base 64 alphabet
126
+ and is unchangable. This way you can dump binary data into XML
127
+ use the standard, and make web urls (web-safe version)
128
+ * Made modp_url_encode escape more characters. This makes it
129
+ more standard.
130
+ * Add modp_url_min_encode which does a more "minimal" encoding
131
+ RFC 3986 actually recommends encoding less characters (the
132
+ original was based for HTML form processing).
133
+ * Improved documentation
134
+
135
+ 28-Aug-2006
136
+ * Added javascript encoding. Convert c-string to a format suitable for
137
+ embedding into javascript (dynamically generated by the server for instance).
138
+ * INTERFACE CHANGE use namespaces for C++ functions, and changed their names
139
+
140
+ 16-May-2006: Release 2.0.0
141
+ * New Prefix: everything is prefixed with modp_bXX, where XX is the
142
+ encoding type
143
+ * Massive unit test coverage using CuTest library
144
+ * New! bfasturl -- high performance url encode/decode!
145
+ * New bfast16 -- high performance hex encode/decode
146
+ * New! C++ bindings using std::string
147
+
148
+ 15-Mar-2006: Release v1.3
149
+ * Version 1.2 b64fast_decode wrote a few extra bytes after the
150
+ data as an optimization. This have been changed so it write ONLY
151
+ the extact number of byte encoded. THis makes it more compatible
152
+ with existing implementations and allows some tricks. (decoding
153
+ directly into a C-struct).
154
+
155
+ 10-Mar-2006: Release v1.2
156
+ * INTERFACE CHANGE -- b65fast_encode returns
157
+ strlen of the result. Not strlen+1 like apache.
158
+ * Change b64 decode to only write the exact bytes (previously
159
+ wrote a few extra 0s at the end for performance reasons)
160
+ * Change b85 default alphabet to exclude "," This allows use with
161
+ V0/Netscape and V1 HTTP cookies.
162
+
163
+ 20-Feb-2006: Release v1.1
164
+ * CRITICAL BUG FIX -- in some cases b64encode will produce bad output
165
+ this may only occur on some compilers
166
+ * Added base85 functionality!
167
+ * Cleaned up source code, added mode-lines, reindented
168
+ * Renamed files to better reflect function
169
+
170
+ 25-Dec-2005: Initial Release v1.0.0
@@ -0,0 +1,276 @@
1
+ # Doxyfile 1.4.6
2
+
3
+ #---------------------------------------------------------------------------
4
+ # Project related configuration options
5
+ #---------------------------------------------------------------------------
6
+ PROJECT_NAME = "modp stringencoders"
7
+ PROJECT_NUMBER = 3.1.0
8
+ OUTPUT_DIRECTORY = doxy
9
+ CREATE_SUBDIRS = NO
10
+ OUTPUT_LANGUAGE = English
11
+ USE_WINDOWS_ENCODING = NO
12
+ BRIEF_MEMBER_DESC = YES
13
+ REPEAT_BRIEF = YES
14
+ ABBREVIATE_BRIEF = "The $name class" \
15
+ "The $name widget" \
16
+ "The $name file" \
17
+ is \
18
+ provides \
19
+ specifies \
20
+ contains \
21
+ represents \
22
+ a \
23
+ an \
24
+ the
25
+ ALWAYS_DETAILED_SEC = NO
26
+ INLINE_INHERITED_MEMB = NO
27
+ FULL_PATH_NAMES = NO
28
+ STRIP_FROM_PATH = /Users/nickg/dev/
29
+ STRIP_FROM_INC_PATH =
30
+ SHORT_NAMES = NO
31
+ JAVADOC_AUTOBRIEF = NO
32
+ MULTILINE_CPP_IS_BRIEF = NO
33
+ DETAILS_AT_TOP = NO
34
+ INHERIT_DOCS = YES
35
+ SEPARATE_MEMBER_PAGES = NO
36
+ TAB_SIZE = 4
37
+ ALIASES =
38
+ OPTIMIZE_OUTPUT_FOR_C = YES
39
+ OPTIMIZE_OUTPUT_JAVA = NO
40
+ BUILTIN_STL_SUPPORT = NO
41
+ DISTRIBUTE_GROUP_DOC = NO
42
+ SUBGROUPING = YES
43
+ #---------------------------------------------------------------------------
44
+ # Build related configuration options
45
+ #---------------------------------------------------------------------------
46
+ EXTRACT_ALL = YES
47
+ EXTRACT_PRIVATE = NO
48
+ EXTRACT_STATIC = NO
49
+ EXTRACT_LOCAL_CLASSES = YES
50
+ EXTRACT_LOCAL_METHODS = YES
51
+ HIDE_UNDOC_MEMBERS = NO
52
+ HIDE_UNDOC_CLASSES = NO
53
+ HIDE_FRIEND_COMPOUNDS = NO
54
+ HIDE_IN_BODY_DOCS = NO
55
+ INTERNAL_DOCS = NO
56
+ CASE_SENSE_NAMES = NO
57
+ HIDE_SCOPE_NAMES = NO
58
+ SHOW_INCLUDE_FILES = NO
59
+ INLINE_INFO = YES
60
+ SORT_MEMBER_DOCS = NO
61
+ SORT_BRIEF_DOCS = NO
62
+ SORT_BY_SCOPE_NAME = NO
63
+ GENERATE_TODOLIST = YES
64
+ GENERATE_TESTLIST = YES
65
+ GENERATE_BUGLIST = YES
66
+ GENERATE_DEPRECATEDLIST= YES
67
+ ENABLED_SECTIONS =
68
+ MAX_INITIALIZER_LINES = 30
69
+ SHOW_USED_FILES = YES
70
+ SHOW_DIRECTORIES = NO
71
+ FILE_VERSION_FILTER =
72
+ #---------------------------------------------------------------------------
73
+ # configuration options related to warning and progress messages
74
+ #---------------------------------------------------------------------------
75
+ QUIET = NO
76
+ WARNINGS = YES
77
+ WARN_IF_UNDOCUMENTED = YES
78
+ WARN_IF_DOC_ERROR = YES
79
+ WARN_NO_PARAMDOC = YES
80
+ WARN_FORMAT = "$file:$line: $text"
81
+ WARN_LOGFILE =
82
+ #---------------------------------------------------------------------------
83
+ # configuration options related to the input files
84
+ #---------------------------------------------------------------------------
85
+ INPUT = src
86
+ FILE_PATTERNS = *.c \
87
+ *.cc \
88
+ *.cxx \
89
+ *.cpp \
90
+ *.c++ \
91
+ *.d \
92
+ *.java \
93
+ *.ii \
94
+ *.ixx \
95
+ *.ipp \
96
+ *.i++ \
97
+ *.inl \
98
+ *.h \
99
+ *.hh \
100
+ *.hxx \
101
+ *.hpp \
102
+ *.h++ \
103
+ *.idl \
104
+ *.odl \
105
+ *.cs \
106
+ *.php \
107
+ *.php3 \
108
+ *.inc \
109
+ *.m \
110
+ *.mm \
111
+ *.dox \
112
+ *.py \
113
+ *.C \
114
+ *.CC \
115
+ *.C++ \
116
+ *.II \
117
+ *.I++ \
118
+ *.H \
119
+ *.HH \
120
+ *.H++ \
121
+ *.CS \
122
+ *.PHP \
123
+ *.PHP3 \
124
+ *.M \
125
+ *.MM \
126
+ *.PY
127
+ RECURSIVE = NO
128
+ EXCLUDE =
129
+ EXCLUDE_SYMLINKS = NO
130
+ EXCLUDE_SYMBOLS = BEGIN_C \
131
+ END_C
132
+ EXCLUDE_PATTERNS = arraytoc* \
133
+ *gen.c
134
+ EXAMPLE_PATH =
135
+ EXAMPLE_PATTERNS = *
136
+ EXAMPLE_RECURSIVE = NO
137
+ IMAGE_PATH =
138
+ INPUT_FILTER =
139
+ FILTER_PATTERNS =
140
+ FILTER_SOURCE_FILES = NO
141
+ #---------------------------------------------------------------------------
142
+ # configuration options related to source browsing
143
+ #---------------------------------------------------------------------------
144
+ SOURCE_BROWSER = YES
145
+ INLINE_SOURCES = NO
146
+ STRIP_CODE_COMMENTS = NO
147
+ REFERENCED_BY_RELATION = NO
148
+ REFERENCES_RELATION = NO
149
+ USE_HTAGS = NO
150
+ VERBATIM_HEADERS = YES
151
+ #---------------------------------------------------------------------------
152
+ # configuration options related to the alphabetical class index
153
+ #---------------------------------------------------------------------------
154
+ ALPHABETICAL_INDEX = NO
155
+ COLS_IN_ALPHA_INDEX = 5
156
+ IGNORE_PREFIX = modp_
157
+ #---------------------------------------------------------------------------
158
+ # configuration options related to the HTML output
159
+ #---------------------------------------------------------------------------
160
+ GENERATE_HTML = YES
161
+ HTML_OUTPUT = html
162
+ HTML_FILE_EXTENSION = .html
163
+ HTML_HEADER = doxy/header.html
164
+ HTML_FOOTER = doxy/footer.html
165
+ HTML_STYLESHEET =
166
+ HTML_ALIGN_MEMBERS = YES
167
+ GENERATE_HTMLHELP = NO
168
+ CHM_FILE =
169
+ HHC_LOCATION =
170
+ GENERATE_CHI = NO
171
+ BINARY_TOC = NO
172
+ TOC_EXPAND = NO
173
+ DISABLE_INDEX = NO
174
+ ENUM_VALUES_PER_LINE = 4
175
+ GENERATE_TREEVIEW = NO
176
+ TREEVIEW_WIDTH = 250
177
+ #---------------------------------------------------------------------------
178
+ # configuration options related to the LaTeX output
179
+ #---------------------------------------------------------------------------
180
+ GENERATE_LATEX = NO
181
+ LATEX_OUTPUT = latex
182
+ LATEX_CMD_NAME = latex
183
+ MAKEINDEX_CMD_NAME = makeindex
184
+ COMPACT_LATEX = NO
185
+ PAPER_TYPE = a4wide
186
+ EXTRA_PACKAGES =
187
+ LATEX_HEADER =
188
+ PDF_HYPERLINKS = NO
189
+ USE_PDFLATEX = NO
190
+ LATEX_BATCHMODE = NO
191
+ LATEX_HIDE_INDICES = NO
192
+ #---------------------------------------------------------------------------
193
+ # configuration options related to the RTF output
194
+ #---------------------------------------------------------------------------
195
+ GENERATE_RTF = NO
196
+ RTF_OUTPUT = rtf
197
+ COMPACT_RTF = NO
198
+ RTF_HYPERLINKS = NO
199
+ RTF_STYLESHEET_FILE =
200
+ RTF_EXTENSIONS_FILE =
201
+ #---------------------------------------------------------------------------
202
+ # configuration options related to the man page output
203
+ #---------------------------------------------------------------------------
204
+ GENERATE_MAN = NO
205
+ MAN_OUTPUT = man
206
+ MAN_EXTENSION = .3
207
+ MAN_LINKS = NO
208
+ #---------------------------------------------------------------------------
209
+ # configuration options related to the XML output
210
+ #---------------------------------------------------------------------------
211
+ GENERATE_XML = NO
212
+ XML_OUTPUT = xml
213
+ XML_SCHEMA =
214
+ XML_DTD =
215
+ XML_PROGRAMLISTING = YES
216
+ #---------------------------------------------------------------------------
217
+ # configuration options for the AutoGen Definitions output
218
+ #---------------------------------------------------------------------------
219
+ GENERATE_AUTOGEN_DEF = NO
220
+ #---------------------------------------------------------------------------
221
+ # configuration options related to the Perl module output
222
+ #---------------------------------------------------------------------------
223
+ GENERATE_PERLMOD = NO
224
+ PERLMOD_LATEX = NO
225
+ PERLMOD_PRETTY = YES
226
+ PERLMOD_MAKEVAR_PREFIX =
227
+ #---------------------------------------------------------------------------
228
+ # Configuration options related to the preprocessor
229
+ #---------------------------------------------------------------------------
230
+ ENABLE_PREPROCESSING = YES
231
+ MACRO_EXPANSION = NO
232
+ EXPAND_ONLY_PREDEF = NO
233
+ SEARCH_INCLUDES = YES
234
+ INCLUDE_PATH =
235
+ INCLUDE_FILE_PATTERNS =
236
+ PREDEFINED =
237
+ EXPAND_AS_DEFINED =
238
+ SKIP_FUNCTION_MACROS = YES
239
+ #---------------------------------------------------------------------------
240
+ # Configuration::additions related to external references
241
+ #---------------------------------------------------------------------------
242
+ TAGFILES =
243
+ GENERATE_TAGFILE =
244
+ ALLEXTERNALS = NO
245
+ EXTERNAL_GROUPS = YES
246
+ PERL_PATH = /usr/bin/perl
247
+ #---------------------------------------------------------------------------
248
+ # Configuration options related to the dot tool
249
+ #---------------------------------------------------------------------------
250
+ CLASS_DIAGRAMS = NO
251
+ HIDE_UNDOC_RELATIONS = YES
252
+ HAVE_DOT = NO
253
+ CLASS_GRAPH = YES
254
+ COLLABORATION_GRAPH = YES
255
+ GROUP_GRAPHS = YES
256
+ UML_LOOK = NO
257
+ TEMPLATE_RELATIONS = NO
258
+ INCLUDE_GRAPH = YES
259
+ INCLUDED_BY_GRAPH = YES
260
+ CALL_GRAPH = NO
261
+ GRAPHICAL_HIERARCHY = YES
262
+ DIRECTORY_GRAPH = YES
263
+ DOT_IMAGE_FORMAT = png
264
+ DOT_PATH =
265
+ DOTFILE_DIRS =
266
+ MAX_DOT_GRAPH_WIDTH = 1024
267
+ MAX_DOT_GRAPH_HEIGHT = 1024
268
+ MAX_DOT_GRAPH_DEPTH = 1000
269
+ DOT_TRANSPARENT = NO
270
+ DOT_MULTI_TARGETS = NO
271
+ GENERATE_LEGEND = YES
272
+ DOT_CLEANUP = YES
273
+ #---------------------------------------------------------------------------
274
+ # Configuration::additions related to the search engine
275
+ #---------------------------------------------------------------------------
276
+ SEARCHENGINE = NO
@@ -0,0 +1,119 @@
1
+
2
+ ----------------------------------------
3
+ RAW
4
+ ----------------------------------------
5
+
6
+ If you are pulling this from github, please run `./bootstrap.sh` to do
7
+ all the gnu-isms.
8
+
9
+
10
+ Mac Users:
11
+
12
+ ```bash
13
+ brew install m4 autoconf automake libtool
14
+ ```
15
+
16
+ (maybe more?)
17
+
18
+ ----------------------------------------
19
+ PLAIN INSTALL
20
+ ----------------------------------------
21
+
22
+
23
+ EXPORT CFLAGS='your optimization flags'
24
+
25
+ gcc defaults to "-O2 -g" you probably want "-O3 -Wall"
26
+
27
+ ./configure
28
+
29
+ make
30
+
31
+ make check
32
+
33
+ make install
34
+ will produce a shared and static library and put in the right places.
35
+ it will also install the include files.
36
+
37
+ ----------------------------------------
38
+ CHANGING THE b64 web/url SAFE ALPHABET
39
+ ----------------------------------------
40
+
41
+ If you are using base 64 encoding for use IN A URL, you
42
+ CAN NOT use the standard mod_b64. You MUST use modp_b64w
43
+ (the w is for "web"). Unfortunately this is not standardized
44
+ and if you are working with a third party, you might need to
45
+ change the "alphabet" (chars).
46
+
47
+ You can change char 62,63 and the padding char with
48
+
49
+ ./configure --with-b64wchars='-_.'
50
+
51
+ where "-" is char 62, "_" is char 63 and "." is the padding char.
52
+
53
+ You can change this if you know what you are doing.
54
+
55
+ ----------------------------------------
56
+ IF YOU DON'T WANT TO DEAL WITH A LIBRARY
57
+ ----------------------------------------
58
+
59
+ Base64 and base85 functions are so small, you might just want to
60
+ directly add them into your existing project. That's fine, it's all
61
+ under the BSD license, so go ahead.
62
+
63
+
64
+ For b64:
65
+ --------
66
+ After doing a "./configure && make", copy
67
+ * src/modp_b64.c
68
+ * src/modp_b64.h
69
+ * modp_b64_data.h
70
+
71
+ ***** BUT, there is an IMPORTANT GOTCHA! *****
72
+
73
+ This code has special versions that are -endian- dependant. This
74
+ means different code is used on an Intel CPU than it is on a Motorola,
75
+ IBM, or Sun CPU.
76
+
77
+ **** IF you are using autoconf, just add AC_C_BIGENDIAN to your
78
+ configure.in script and everything will work.
79
+
80
+ **** IF NOT, edit modp_b64.c, and replace the
81
+ #include "config.h"
82
+ with
83
+ #define WORDS_BIGENDIAN /* for Sun, Ibm, Motorola */
84
+ OR
85
+ #undef WORDS_BIGENDIAN /* For intel, amd */
86
+
87
+ see the source code for details. Likewise you can pass in
88
+ -DWORDS_BIGENDIAN or -DNWORDS_BIGENDIAN during compilation.
89
+
90
+ For b85:
91
+ --------
92
+ There are no endian issues. Just copy
93
+
94
+ * src/modp_b85.c
95
+ * src/modp_b85.h
96
+ * modp_b85_data.h
97
+
98
+ ----------------------------------------
99
+ UNIT TESTS
100
+ ----------------------------------------
101
+
102
+ Two unit tests are included that are not installed. They are built
103
+ automatically and can be run with "make test"
104
+
105
+ ./speedtest tests performance of b64 and b85
106
+ ./unittest tests correctness of b64
107
+ ./b85test test correectness of b75
108
+
109
+
110
+ If you are changing the base64 alphabet, just edit the b64gen.c program
111
+ and type 'make'.
112
+
113
+ If you are changing the base85 alphabet, edit the b85gen.c program and
114
+ type 'make'.
115
+
116
+ ALWAYS UNIT TEST ANY CHANGES. The current unittests depend on the
117
+ standard alphabet, so you might need to tweek them if to make custom
118
+ alterations.
119
+
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Nick Galbreath
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1,3 @@
1
+ SUBDIRS = src test
2
+
3
+ CLEANFILES=test-driver test/modp_b64r_test.c test/modp_b64w_test.c config.h.in~
@@ -0,0 +1,3 @@
1
+ I'm using the changelog for news.
2
+ Read that.
3
+
@@ -0,0 +1,2 @@
1
+ See README.md
2
+ x
@@ -0,0 +1,32 @@
1
+ fast c-string transformations
2
+
3
+ [![Build Status](https://travis-ci.org/client9/stringencoders.svg?branch=master)](https://travis-ci.org/client9/stringencoders)
4
+
5
+ Hello!
6
+
7
+ I don't use this library anymore and try to avoid C programming if possible. That said,
8
+ I'm very happy to accept pull-requests and collaborators.
9
+
10
+ ## Install from Source
11
+
12
+ * You'll need to install autoconf, automake and libtool
13
+ * run `./bootstrap.sh`
14
+ * run `./configure`
15
+ * run `make && make check`
16
+
17
+ ## Known Issues:
18
+
19
+ * `modp_base64_decode` expects **aligned** strings as input. For Intel, is
20
+ doesn't matter. But for ARM chips it can segfault.
21
+ * `modp_numtoa.c` functions may produce different rounding than whatever
22
+ `printf` is on your system.
23
+ * On mingw (windows) compiling with `-D__USE_MINGW_ANSI_STDIO` gives the
24
+ standard `prinf` behavior.
25
+
26
+ ## Alpine Linux / musl-libc
27
+
28
+ * As mentioned, the tests for `modp_numtoa.c` may fail due to a different
29
+ rounding algorithm.
30
+ * https://wiki.alpinelinux.org/wiki/How_to_get_regular_stuff_working
31
+ * `apk add gcc bash autoconf automake libtools util-linux pciutils usbutils coreutils binutils findutils grep`
32
+
@@ -0,0 +1,3 @@
1
+ #!/bin/sh
2
+ autoreconf --install --force
3
+ automake --add-missing >/dev/null 2>&1
@@ -0,0 +1,16 @@
1
+ #!/bin/sh
2
+ set -e
3
+ #
4
+ # See https://wiki.debian.org/Hardening for details
5
+ #
6
+ # -Wno-padded padding can change by OS/version this check is really
7
+ # for embedded systems so it's ok to skip
8
+ #
9
+ # -Wno-covered-switch-default Don't warn if we have a switch that
10
+ # covers all of an enum AND we have a default. enums are only losely
11
+ # typed, it's good to have a default: assert(0) in case someone does
12
+ # a bad cast, etc also this conflicts with GCC checks.
13
+ #
14
+ export CFLAGS="-g -O3 -pie -fPIE -fPIC -fstack-protector --param ssp-buffer-size=4 -Wall -Wextra -Wformat -Wformat-security -Werror -Wcast-align -Wshadow -Wpointer-arith -Wcast-qual -Wstack-protector -D_FORTIFY_SOURCE=2 -ansi"
15
+ ./configure --with-pic --disable-shared --enable-static
16
+ make clean