Skip to content

Instantly share code, notes, and snippets.

View bsreera's full-sized avatar

Bharath Bhushan Sreeravindra bsreera

View GitHub Profile
@bsreera
bsreera / ECDH_JWE.java
Created April 15, 2019 20:26
ECDH JWE AES256GCM P-521
import com.nimbusds.jose.*;
import com.nimbusds.jose.crypto.ECDHDecrypter;
import com.nimbusds.jose.crypto.ECDHEncrypter;
import com.nimbusds.jose.crypto.bc.BouncyCastleProviderSingleton;
import com.nimbusds.jose.jwk.Curve;
import com.nimbusds.jose.jwk.ECKey;
import com.nimbusds.jose.util.Base64URL;
import com.nimbusds.jwt.EncryptedJWT;
import net.minidev.json.JSONObject;