jwt_set_alg

Set an algorithm from jwt_alg_t for this JWT object.

Specifies an algorithm for a JWT object. If JWT_ALG_NONE is used, then key must be NULL and len must be 0. All other algorithms must have a valid pointer to key data, which may be specific to the algorithm (e.g RS256 expects a PEM formatted RSA key).

@param jwt Pointer to a JWT object. @param alg A valid jwt_alg_t specifier. @param key The key data to use for the algorithm. @param len The length of the key data. @return Returns 0 on success, valid errno otherwise.

extern (C) nothrow @nogc
int
jwt_set_alg
(,,
const(ubyte)* key
,
int len
)

Meta