diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-05-17 17:28:18 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-05-17 17:28:18 +0200 |
commit | 3b0dadc28bb1d8b9849243fa9114603303f149ba (patch) | |
tree | c550fea4cb17d047b7b0acadc31ae2510d321d9a /src/include/taler_json_lib.h | |
parent | 2f67dbebc572f1c70c3bfcb39fec45591aea9bc8 (diff) |
add functions for conversion from json to rsa public key/signature for symmetry, testing, etc.
Diffstat (limited to 'src/include/taler_json_lib.h')
-rw-r--r-- | src/include/taler_json_lib.h | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h index 2f0c54498..ede2a20ee 100644 --- a/src/include/taler_json_lib.h +++ b/src/include/taler_json_lib.h @@ -97,17 +97,6 @@ TALER_json_from_data (const void *data, size_t size); /** - * Convert binary hash to a JSON string with the base32crockford - * encoding. - * - * @param hc binary data - * @return json string that encodes @a hc - */ -json_t * -TALER_json_from_hash (const struct GNUNET_HashCode *hc); - - -/** * Parse given JSON object to Amount * * @param json the json object representing Amount @@ -142,6 +131,27 @@ TALER_json_to_data (json_t *json, void *out, size_t out_size); + +/** + * Convert JSON to RSA public key. + * + * @param pk JSON encoding to convert + * @return corresponding public key + */ +struct GNUNET_CRYPTO_rsa_PublicKey * +TALER_json_to_rsa_public_key (json_t *json); + + +/** + * Convert JSON to RSA signature. + * + * @param pk JSON encoding to convert + * @return corresponding signature + */ +struct GNUNET_CRYPTO_rsa_Signature * +TALER_json_to_rsa_signature (json_t *json); + + /** * Check if the given wire format JSON object is correctly formatted * |