diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-07-10 11:57:53 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-07-10 11:57:53 +0100 |
commit | b6e248c9a58cccbcd5dea7bdc8e3cdee4af03722 (patch) | |
tree | 0924e69d210b7d6878c7fb11f68b942b15f3ca6c /include/olm/olm.hh | |
parent | 373acefde7be92f86b8294b325519ad916b1e054 (diff) |
Output simpler JSON for the account keys, don't sign the JSON but instead provide a olm_account_sign method so that the user of the library can sign the JSON themselves
Diffstat (limited to 'include/olm/olm.hh')
-rw-r--r-- | include/olm/olm.hh | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/include/olm/olm.hh b/include/olm/olm.hh index 46f7a68..2919767 100644 --- a/include/olm/olm.hh +++ b/include/olm/olm.hh @@ -132,11 +132,7 @@ size_t olm_create_account( /** The size of the output buffer needed to hold the identity keys */ size_t olm_account_identity_keys_length( - OlmAccount * account, - size_t user_id_length, - size_t device_id_length, - uint64_t valid_after_ts, - uint64_t valid_until_ts + OlmAccount * account ); /** Writes the public parts of the identity keys for the account into the @@ -145,13 +141,24 @@ size_t olm_account_identity_keys_length( * "OUTPUT_BUFFER_TOO_SMALL". */ size_t olm_account_identity_keys( OlmAccount * account, - void const * user_id, size_t user_id_length, - void const * device_id, size_t device_id_length, - uint64_t valid_after_ts, - uint64_t valid_until_ts, void * identity_keys, size_t identity_key_length ); + +/** The length of an ed25519 signature encoded as base64. */ +size_t olm_account_signature_length( + OlmAccount * account +); + +/** Signs a message with the ed25519 key for this account. Returns olm_error() + * on failure. If the signature buffer was too small then + * olm_account_last_error() will be "OUTPUT_BUFFER_TOO_SMALL" */ +size_t olm_account_sign( + OlmAccount * account, + void const * message, size_t message_length, + void * signature, size_t signature_length +); + /** The size of the output buffer needed to hold the one time keys */ size_t olm_account_one_time_keys_length( OlmAccount * account |