jose_b64.3 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. .TH "jose_b64" 3 "Tue May 30 2017" "José" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. jose_b64 \- URL-safe Base64 Encoding & Decoding\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .SS "Functions"
  10. .in +1c
  11. .ti -1c
  12. .RI "size_t \fBjose_b64_dec\fP (const json_t *i, void *o, size_t ol)"
  13. .br
  14. .RI "Decodes a URL-safe Base64 JSON string to a buffer\&. "
  15. .ti -1c
  16. .RI "\fBjose_io_t\fP * \fBjose_b64_dec_io\fP (\fBjose_io_t\fP *next)"
  17. .br
  18. .RI "Creates a new IO object which performs URL-safe Base64 decoding\&. "
  19. .ti -1c
  20. .RI "size_t \fBjose_b64_dec_buf\fP (const void *i, size_t il, void *o, size_t ol)"
  21. .br
  22. .RI "Decodes a URL-safe Base64 buffer to an output buffer\&. "
  23. .ti -1c
  24. .RI "json_t * \fBjose_b64_dec_load\fP (const json_t *i)"
  25. .br
  26. .RI "Decodes a JSON string from a URL-safe Base64 JSON string\&. "
  27. .ti -1c
  28. .RI "json_t * \fBjose_b64_enc\fP (const void *i, size_t il)"
  29. .br
  30. .RI "Encodes data to a URL-safe Base64 JSON string\&. "
  31. .ti -1c
  32. .RI "\fBjose_io_t\fP * \fBjose_b64_enc_io\fP (\fBjose_io_t\fP *next)"
  33. .br
  34. .RI "Creates a new IO object which performs URL-safe Base64 encoding\&. "
  35. .ti -1c
  36. .RI "size_t \fBjose_b64_enc_buf\fP (const void *i, size_t il, void *o, size_t ol)"
  37. .br
  38. .RI "Encodes data to a URL-safe Base64 buffer\&. "
  39. .ti -1c
  40. .RI "json_t * \fBjose_b64_enc_dump\fP (const json_t *i)"
  41. .br
  42. .RI "Encodes the input JSON as a URL-safe Base64 JSON string\&. "
  43. .in -1c
  44. .SH "Detailed Description"
  45. .PP
  46. URL-safe Base64 Encoding & Decoding\&.
  47. .SH "Function Documentation"
  48. .PP
  49. .SS "size_t jose_b64_dec (const json_t * i, void * o, size_t ol)"
  50. .PP
  51. Decodes a URL-safe Base64 JSON string to a buffer\&. If \fCo\fP is NULL, the number of output bytes necessary is returned\&.
  52. .PP
  53. This function will never write more than \fCol\fP bytes\&. If the output buffer is too small, an error will occur\&.
  54. .PP
  55. \fBParameters:\fP
  56. .RS 4
  57. \fIi\fP The input URL-safe Base64 JSON string\&.
  58. .br
  59. \fIo\fP The output buffer (may be NULL)\&.
  60. .br
  61. \fIol\fP The size of the output buffer\&.
  62. .RE
  63. .PP
  64. \fBReturns:\fP
  65. .RS 4
  66. The number of bytes that were (or would be) written\&. If an error occurs, SIZE_MAX is returned\&.
  67. .RE
  68. .PP
  69. .SS "\fBjose_io_t\fP* jose_b64_dec_io (\fBjose_io_t\fP * next)"
  70. .PP
  71. Creates a new IO object which performs URL-safe Base64 decoding\&. All data written to the returned IO object will be decoded before passing it on to the next IO object in the chain\&.
  72. .PP
  73. \fBParameters:\fP
  74. .RS 4
  75. \fInext\fP The next IO object in the chain\&.
  76. .RE
  77. .PP
  78. \fBReturns:\fP
  79. .RS 4
  80. The new IO object or NULL on error\&.
  81. .RE
  82. .PP
  83. .SS "size_t jose_b64_dec_buf (const void * i, size_t il, void * o, size_t ol)"
  84. .PP
  85. Decodes a URL-safe Base64 buffer to an output buffer\&. If \fCo\fP is NULL, the number of output bytes necessary is returned\&.
  86. .PP
  87. This function will never write more than \fCol\fP bytes\&. If the output buffer is too small, an error will occur\&.
  88. .PP
  89. \fBParameters:\fP
  90. .RS 4
  91. \fIi\fP The input URL-safe Base64 buffer\&.
  92. .br
  93. \fIil\fP The size of the data in the input buffer\&.
  94. .br
  95. \fIo\fP The output buffer\&.
  96. .br
  97. \fIol\fP The size of the output buffer\&.
  98. .RE
  99. .PP
  100. \fBReturns:\fP
  101. .RS 4
  102. The number of bytes that were (or would be) written\&. If an error occurs, SIZE_MAX is returned\&.
  103. .RE
  104. .PP
  105. .SS "json_t* jose_b64_dec_load (const json_t * i)"
  106. .PP
  107. Decodes a JSON string from a URL-safe Base64 JSON string\&.
  108. .PP
  109. \fBParameters:\fP
  110. .RS 4
  111. \fIi\fP The input URL-safe Base64 JSON string containing JSON data\&.
  112. .RE
  113. .PP
  114. \fBReturns:\fP
  115. .RS 4
  116. The output JSON data\&.
  117. .RE
  118. .PP
  119. .SS "json_t* jose_b64_enc (const void * i, size_t il)"
  120. .PP
  121. Encodes data to a URL-safe Base64 JSON string\&.
  122. .PP
  123. \fBParameters:\fP
  124. .RS 4
  125. \fIi\fP The input buffer\&.
  126. .br
  127. \fIil\fP The size of the data in the input buffer\&.
  128. .RE
  129. .PP
  130. \fBReturns:\fP
  131. .RS 4
  132. The decoded JSON data\&. If an error occurs, NULL is returned\&.
  133. .RE
  134. .PP
  135. .SS "\fBjose_io_t\fP* jose_b64_enc_io (\fBjose_io_t\fP * next)"
  136. .PP
  137. Creates a new IO object which performs URL-safe Base64 encoding\&. All data written to the returned IO object will be encoded before passing it on to the next IO object in the chain\&.
  138. .PP
  139. \fBParameters:\fP
  140. .RS 4
  141. \fInext\fP The next IO object in the chain\&.
  142. .RE
  143. .PP
  144. \fBReturns:\fP
  145. .RS 4
  146. The new IO object or NULL on error\&.
  147. .RE
  148. .PP
  149. .SS "size_t jose_b64_enc_buf (const void * i, size_t il, void * o, size_t ol)"
  150. .PP
  151. Encodes data to a URL-safe Base64 buffer\&. If \fCo\fP is NULL, the number of output bytes necessary is returned\&.
  152. .PP
  153. This function will never write more than \fCol\fP bytes\&. If the output buffer is too small, an error will occur\&.
  154. .PP
  155. \fBParameters:\fP
  156. .RS 4
  157. \fIi\fP The input buffer\&.
  158. .br
  159. \fIil\fP The size of the data in the input buffer\&.
  160. .br
  161. \fIo\fP The output URL-safe Base64 buffer\&.
  162. .br
  163. \fIol\fP The size of the output buffer\&.
  164. .RE
  165. .PP
  166. \fBReturns:\fP
  167. .RS 4
  168. The number of bytes that were (or would be) written\&. If an error occurs, SIZE_MAX is returned\&.
  169. .RE
  170. .PP
  171. .SS "json_t* jose_b64_enc_dump (const json_t * i)"
  172. .PP
  173. Encodes the input JSON as a URL-safe Base64 JSON string\&.
  174. .PP
  175. \fBParameters:\fP
  176. .RS 4
  177. \fIi\fP The input JSON data\&.
  178. .RE
  179. .PP
  180. \fBReturns:\fP
  181. .RS 4
  182. The output URL-safe Base64 JSON string\&.
  183. .RE
  184. .PP
  185. .SH "Author"
  186. .PP
  187. Generated automatically by Doxygen for José from the source code\&.