Encrypt and decrypt
Encrypt claims or data so only the holder of the right key can read them, and any change makes the token fail to open.
An encrypted token (a JWE) is a locked box. Each token gets a fresh random key that locks the content, and that key is itself locked for the recipient: with a key you share, with the recipient's public key, or with a key derived from a password. The recipient unlocks the small key, then the box, and the box's seal breaks if anyone changed a byte on the way. Unlike a signed token, nobody on the path can read the content. What a JWE made with a public key doesn't tell you is who sent it, since anyone holding that public key can lock a box; sign, then encrypt when the sender matters. Concepts has the vocabulary.
Encrypt a payload
Turn claims, text or bytes and a key or password into a compact token.
Decrypt a token
Open the token with a key, a JWK Set or a password, and check its claims.
Encrypt for several recipients
Encrypt once and let several recipients open it, each with its own key.
Choose encryption algorithms
Which alg delivers the key and which enc locks the content.