jwt_crypto_grp(3)

πŸ“¦
version 3.3.3 Β· 2 versions
, in ubuntu stonking

πŸ’– 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 set JWT_CRYPTO to the default operations you wish to use. If JWT_CRYPTO is 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 handling
  • JWT_CRYPTO_OPS_OPENSSL β€” OpenSSL Library
  • JWT_CRYPTO_OPS_GNUTLS β€” GnuTLS Library
  • JWT_CRYPTO_OPS_MBEDTLS β€” MBedTLS embedded library
  • JWT_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

  • 1 if it does, 0 if 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_t of 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

  • 0 on success, 1 for 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 valid jwt_crypto_provider_t type

Returns

  • 0 on success, 1 for 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