The jose4j library is an open source implementation of JWS (JSON Web Signature), JWE (Encryption),
JWA (Algorithms) and JWK (Key) from the IETF JOSE (JavaScrip Object Signing and Encryption) Working Group.
It is written in Java and relies solely on the JCA APIs for cryptography.
Please see https://bitbucket.org/b_c/jose4j/wiki/Home for more info.