JSON 使用 cjsoe 进行网络加密

JSON web encryption using cjsoe

任何关于如何使用 cjose library with a simple JSON. JSON example from the ietf-jose

的帮助

有人可以给我一些指示吗?谢谢

给定的 Json 示例与来自 cjose 的 Json 示例之间没有一一对应关系。但你可能想了解算法是如何应用研究的 来自 test 的功能, 特别是

static void _self_encrypt_self_decrypt(const char *plain1)

static void _self_encrypt_self_decrypt_with_key(const char *alg, const char *enc, const char *key, const char *plain1)

 _self_encrypt_self_decrypt_with_key(CJOSE_HDR_ALG_A128KW, CJOSE_HDR_ENC_A128CBC_HS256, JWK_OCT_16, plain1);

及主要测试功能

START_TEST(test_cjose_jwe_node_jose_encrypt_self_decrypt)
START_TEST(test_cjose_jwe_multiple_recipients)