본문 바로가기

카테고리 없음

Generate Jwt Secret Key C



Warning

Mar 03, 2020  JSON Web Token (JWT) is a compact, URL-safe means of securely transmitting information between parties as a JSON object. JWT is a simple text string that can be used by the client and server to authenticate and transfer the information easily. A Token is encoded from a payload data using a secret key. That token is passed to the client.

This library is a work in progress. It's not ready for production yet.

This lib exposes a simple class to work with signed JSON Web Tokens (JWT).It had been developped by Mozilla while making a C++ implementation ofBrowserID.

JSON Web Tokens (JWT) are described in this document

Installation

Running make and make install should do the trick.

Dependencies

You need to have the following library installed on your system:

  • cryptopp for the crypto related stuff
  • jansson to deal with json

Generate jwt secret key

How to use it?

Key

Once installed, jwtcpp provides a bunch of functions and methods so you canextract information about the JSON Web Tokens.

Here is an example application showing how you can use the library:

Secret Key Skin Care

jwtcpp also provides a cli application able to generate and decode JWT. You caninvoke it like this: