aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-06-12 09:08:15 +0100
committerMark Haines <mark.haines@matrix.org>2015-06-12 09:08:15 +0100
commit08a7e44a966047a10d7e959d4a8cdeaaf4139ce0 (patch)
tree8e80ff0b0ed3e93c3bcc575ead1f9ae1b1e34ff8 /include
parent793b9b910a8f3c010a55433188e4b63414cbb314 (diff)
Pass the message body to decrypt_max_plaintext_length so we can get a more accurate estimate, rename encrypt_max_output_length to encrypt_output_length and change the api to return the exact number of bytes needed to hold the message
Diffstat (limited to 'include')
-rw-r--r--include/axolotl/ratchet.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/axolotl/ratchet.hh b/include/axolotl/ratchet.hh
index f7d30d0..eaf1352 100644
--- a/include/axolotl/ratchet.hh
+++ b/include/axolotl/ratchet.hh
@@ -129,9 +129,9 @@ struct Ratchet {
std::uint8_t * input, std::size_t input_length
);
- /** The maximum number of bytes of output the encrypt method will write for
+ /** The number of bytes of output the encrypt method will write for
* a given message length. */
- std::size_t encrypt_max_output_length(
+ std::size_t encrypt_output_length(
std::size_t plaintext_length
);
@@ -154,7 +154,7 @@ struct Ratchet {
/** An upper bound on the number of bytes of plain-text the decrypt method
* will write for a given input message length. */
std::size_t decrypt_max_plaintext_length(
- std::size_t input_length
+ std::uint8_t const * input, std::size_t input_length
);
/** Decrypt a message. Returns the length of the decrypted plain-text or