jwt_crypto_grp(3)
π jwt_crypto_grp β Cryptographic Ops π
okay so bestie, welcome to jwt_crypto_grp(3) from the Library Functions Manual β this is the page that handles all the "which crypto library are we even using rn" drama for LibJWT. grab a strawberry matcha, we're going in πβ¨
β¨ NAME β¨
jwt_crypto_grp β Cryptographic Ops π«Ά
π SYNOPSIS π
π Enumerations
enum jwt_crypto_provider_t {
JWT_CRYPTO_OPS_NONE = 0,
JWT_CRYPTO_OPS_OPENSSL,
JWT_CRYPTO_OPS_GNUTLS,
JWT_CRYPTO_OPS_MBEDTLS,
JWT_CRYPTO_OPS_ANY
};
Different providers for crypto operations. like, the whole menu of options, no cap π
π¦ Functions
const char * jwt_get_crypto_ops (void)
jwt_crypto_provider_t jwt_get_crypto_ops_t (void)
int jwt_set_crypto_ops (const char *opname)
int jwt_set_crypto_ops_t (jwt_crypto_provider_t opname)
int jwt_crypto_ops_supports_jwk (void)
π Detailed Description π
Functions used to set and get which crypto operations are used. it's giving "who's driving the crypto car" energy fr fr.
LibJWT supports several crypto libraries, mainly "openssl", "gnutls", and "mbedtls". By default, "openssl" is used. iconic default behavior honestly β¨
β οΈ Warning β Changing the crypto operations is not thread safe. You must protect changing them with some sort of lock, including locking around usage of the operations themselves. Ideally, you should only perform this at the start of your application before using any of LibJWTs functions. Failing to follow this guide can lead to crashes in certain situations. π like genuinely, do not play with this one bestie, do it at startup and move on.
πΈ Remarks β ENVIRONMENT: You can setJWT_CRYPTOto the default operations you wish to use. IfJWT_CRYPTOis invalid, an error message will be printed to the console when LibJWT is loaded by the application.
π§ Enumeration Type Documentation π§
π enum jwt_crypto_provider_t
Different providers for crypto operations. Used to set or test the underlying cryptographic library provider.
π Remarks β These being present are not a guarantee that the JWT library has been compiled to support it. Also, certain functions of the library may not be supported by each. For example, not all of them support JWKS operations. lowkey important, highkey a vibe check before you assume anything.
π Enumerator
JWT_CRYPTO_OPS_NONEβ Used for error handlingJWT_CRYPTO_OPS_OPENSSLβ OpenSSL LibraryJWT_CRYPTO_OPS_GNUTLSβ GnuTLS LibraryJWT_CRYPTO_OPS_MBEDTLSβ MBedTLS embedded libraryJWT_CRYPTO_OPS_ANYβ Used internally for hmac keys
π«Ά Function Documentation π«Ά
π
int jwt_crypto_ops_supports_jwk (void )
Check if the current crypto operations support JWK usage. basically asking "can u even do this or not" π
Returns
1if it does,0if not
β¨ const char * jwt_get_crypto_ops (void )
Retrieve the name of the current crypto operations being used. tell me who u are bestie π
Returns
- name of the crypto operation set
π¦ jwt_crypto_provider_t jwt_get_crypto_ops_t (void )
Retrieve the type of the current crypto operations being used.
Returns
jwt_crypto_provider_tof the crypto operation set
πΈ int jwt_set_crypto_ops (const char * opname)
Set the crypto operations to the named set. main character moment, you're choosing the provider now π
The opname is one of the available operators in the compiled version of LibJWT. Most times, this is either "openssl" or "gnutls".
Parameters
opnameβ the name of the crypto operation to set
Returns
0on success,1for error
π int jwt_set_crypto_ops_t (jwt_crypto_provider_t opname)
Set the crypto operations to a jwt_crypto_provider_t type.
The same as jwt_set_crypto_ops(), but uses the type as opname.
Parameters
opnameβ A validjwt_crypto_provider_ttype
Returns
0on success,1for error
π Author π
Generated automatically by Doxygen for LibJWT from the source code. (not a human, just a robot doing its lil thing, we love that for it π€π)
π and that's the whole page bestie! this one came from LibJWT, Version 3.3.3, dated with the jwt_crypto_grp(3) energy β go forth and set your crypto ops at startup, protect ur threads, and slay π
β¨π
π¦ where this page comes from
- ubuntu stonking: libjwt14-doc 3.3.3-1build1 Β· MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms