Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Olm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
Olm
Commits
3f475ab2
Commit
3f475ab2
authored
9 years ago
by
Mark Haines
Browse files
Options
Downloads
Patches
Plain Diff
Note that the input buffers are destroyed by some of the account and session methods
parent
043bc437
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/axolotl/axolotl.hh
+20
-17
20 additions, 17 deletions
include/axolotl/axolotl.hh
with
20 additions
and
17 deletions
include/axolotl/axolotl.hh
+
20
−
17
View file @
3f475ab2
...
...
@@ -96,7 +96,8 @@ size_t axolotl_pickle_session(
* the supplied key. Returns axolotl_error() on failure. If the key doesn't
* match the one used to encrypt the account then axolotl_account_last_error()
* will be "BAD_ACCOUNT_KEY". If the base64 couldn't be decoded then
* axolotl_account_last_error() will be "INVALID_BASE64". */
* axolotl_account_last_error() will be "INVALID_BASE64". The input pickled
* buffer is destroyed */
size_t
axolotl_unpickle_account
(
AxolotlAccount
*
account
,
void
const
*
key
,
size_t
key_length
,
...
...
@@ -107,7 +108,8 @@ size_t axolotl_unpickle_account(
* the supplied key. Returns axolotl_error() on failure. If the key doesn't
* match the one used to encrypt the account then axolotl_session_last_error()
* will be "BAD_ACCOUNT_KEY". If the base64 couldn't be decoded then
* axolotl_session_last_error() will be "INVALID_BASE64". */
* axolotl_session_last_error() will be "INVALID_BASE64". The input pickled
* buffer is destroyed */
size_t
axolotl_unpickle_session
(
AxolotlSession
*
session
,
void
const
*
key
,
size_t
key_length
,
...
...
@@ -253,12 +255,12 @@ size_t axolotl_encrypt(
);
/** The maximum number of bytes of plain-text a given message could decode to.
* The actual size could be different due to padding. Returns axolotl_error()
* on failures. If the message base64 couldn't be decoded then
* axolotl_session_last_error() will be "INVALID_BASE64". If the message
* is for an unsupported version of the protocol then
* axolotl_session_last_error() will be "BAD_MESSAGE_VERSION". If the message
* The actual size could be different due to padding. The input message buffer
* is destroyed. Returns axolotl_error() on failure. If the message base64
* couldn't be decoded then axolotl_session_last_error() will be
* "INVALID_BASE64". If the message is for an unsupported version of the
* protocol then axolotl_session_last_error() will be "BAD_MESSAGE_VERSION".
* If the message couldn't be decoded then axolotl_session_last_error() will be
* "BAD_MESSAGE_FORMAT". */
size_t
axolotl_decrypt_max_plaintext_length
(
AxolotlSession
*
session
,
...
...
@@ -266,16 +268,17 @@ size_t axolotl_decrypt_max_plaintext_length(
void
*
message
,
size_t
message_length
);
/** Decrypts a message using the session. Returns the length of the plain-text
* on success. Returns axolotl_error() on failure. If the plain-text buffer
* is smaller than axolotl_decrypt_max_plaintext_length() then
* axolotl_session_last_error() will be "OUTPUT_BUFFER_TOO_SMALL". If the
* base64 couldn't be decoded then axolotl_session_last_error() will be
* "INVALID_BASE64". If the message is for an unsupported version of the
* protocol then axolotl_session_last_error() will be "BAD_MESSAGE_VERSION".
* If the message couldn't be decoded then axolotl_session_last_error() will be
* "BAD_MESSAGE_FORMAT". If the MAC on the message was invalid then
* axolotl_session_last_error() will be "BAD_MESSAGE_MAC". */
/** Decrypts a message using the session. The input message buffer is destroyed.
* Returns the length of the plain-text on success. Returns axolotl_error() on
* failure. If the plain-text buffer is smaller than
* axolotl_decrypt_max_plaintext_length() then axolotl_session_last_error()
* will be "OUTPUT_BUFFER_TOO_SMALL". If the base64 couldn't be decoded then
* axolotl_session_last_error() will be "INVALID_BASE64". If the message is for
* an unsupported version of the protocol then axolotl_session_last_error() will
* be "BAD_MESSAGE_VERSION". If the message couldn't be decoded then
* axolotl_session_last_error() will be BAD_MESSAGE_FORMAT".
* If the MAC on the message was invalid then axolotl_session_last_error() will
* be "BAD_MESSAGE_MAC". */
size_t
axolotl_decrypt
(
AxolotlSession
*
session
,
size_t
message_type
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment