How should the chillbuff's underlying array grow in size once its maximum capacity is reached during a push_back?
Frees a chillbuff instance. @param buff The chillbuff to deallocate. If this is <code>NULL</code>, nothing happens at all.
Initializes a chillbuff instance and makes it ready to accept data. @param buff The chillbuff instance to init (or rather, a pointer to it). @param initial_capacity The initial capacity of the underlying array. If you pass <code>0</code> here, <code>16</code> is used by default. @param element_size How big should every array element be? E.g. if you're storing <code>int</code> you should pass <code>sizeof(int)</code>. @param growth_method How should the buffer grow once its maximum capacity is reached? @see chillbuff_growth_method @return Chillbuff exit code as defined at the top of the chillbuff.h header file. <code>0</code> means success.
Decode (and validate) a JWT using specific parameters. <p> The resulting {@link #l8w8jwt_validation_result} written into the passed "out_validation_result" pointer contains validation failure flags (see the {@link #l8w8jwt_validation_result} enum docs for more details). <p> This only happens if decoding also succeeded: if the token is malformed, nothing will be written into "out_validation_result". <p> If validation succeeds, the {@link #l8w8jwt_validation_result} receives the value 0 (enum value <code>L8W8JWT_VALID</code>). <p> The same applies to the "out_claims" argument: it is only allocated and written to if it (obviously) isn't <code>NULL</code> and if the decoding was also successful!
Initializes a {@link #l8w8jwt_decoding_params} instance by setting its fields to default values. @param params The l8w8jwt_decoding_params to initialize (set to default values).
Creates, signs and encodes a Json-Web-Token. <p> An example output could be: <code>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InNvbWUta2V5LWlkLWhlcmUtMDEyMzQ1NiJ9.eyJpYXQiOjE1Nzk2NDUzNTUsImV4cCI6MTU3OTY0NTk1NSwic3ViIjoiR29yZG9uIEZyZWVtYW4iLCJpc3MiOiJCbGFjayBNZXNhIiwiYXVkIjoiQWRtaW5pc3RyYXRvciJ9.uk4EEoq0ql_SguLto5EWzklakpzO-6GE2U26crB8vUY</code> <p> @param params The token encoding parameters (e.g. "alg", "iss", "exp", etc...). @return Return code as defined in retcodes.h @see l8w8jwt_encoding_params
Initializes a {@link #l8w8jwt_encoding_params} instance by setting its fields to default values. @param params The l8w8jwt_encoding_params to initialize (set to default values).
Frees a heap-allocated <code>l8w8jwt_claim</code> array. @param claims The claims to free. @param claims_count The size of the passed claims array.
Gets a claim by key from a l8w8jwt_claim array. @param claims The array to look in. @param claims_count The claims array size. @param key The claim key (e.g. "sub") to look for. @param key_length The claim key's string length. @return The found claim; <code>NULL</code> if no such claim was found in the array.
Validates a set of l8w8jwt_decoding_params. @param params The l8w8jwt_decoding_params to validate. @return Return code as defined in retcodes.h
Validates a set of l8w8jwt_encoding_params. @param params The l8w8jwt_encoding_params to validate. @return Return code as defined in retcodes.h
Writes a bunch of JWT claims into a chillbuff stringbuilder. <p> Curly braces and trailing commas won't be written; only the "key":"value" pairs! @param stringbuilder The buffer into which to write the claims. @param claims The l8w8jwt_claim array of claims to write. @param claims_count The claims array size. @return Return code as specified inside retcodes.h
JWT claim value type JSON array (e.g. <code>"ids": [2, 4, 8, 16]</code>).
JWT claim value is a boolean (e.g. <code>"done": true</code>).
JWT claim value is an integer (e.g. <code>"exp": 1579610629</code>)
JWT claim value is null (e.g. <code>"ref": null</code>).
JWT claim value type number (e.g. <code>"size": 1.85</code>).
JWT claim value type is a JSON object (e.g. <code>"objs": { "name": "GMan", "id": 420 }</code>).
JWT claim value is some other type.
JWT claim value is a string (e.g. <code>"iss": "glitchedpolygons.com"</code>).
Self-reallocating dynamic size array of no strictly defined type. Easy 'n' "chill" (hope you like segmentation fault errors).
Struct containing a jwt claim key-value pair.<p> If allocated on the heap by the decode function, remember to call <code>l8w8jwt_claims_free()</code> on it once you're done using it.
Struct containing the parameters to use for decoding and validating a JWT.
Struct containing the parameters to use for creating a JWT with l8w8jwt.