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
5e1b8a5b
Commit
5e1b8a5b
authored
9 years ago
by
Mark Haines
Browse files
Options
Downloads
Patches
Plain Diff
Add docstrings for the utility class
parent
7649125a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/olm/utility.hh
+9
-0
9 additions, 0 deletions
include/olm/utility.hh
with
9 additions
and
0 deletions
include/olm/utility.hh
+
9
−
0
View file @
5e1b8a5b
...
...
@@ -31,13 +31,22 @@ struct Utility {
ErrorCode
last_error
;
/** The length of a SHA-256 hash in bytes. */
std
::
size_t
sha256_length
();
/** Compute a SHA-256 hash. Returns the length of the SHA-256 hash in bytes
* on success. Returns std::size_t(-1) on failure. On failure last_error
* will be set with an error code. If the output buffer was too small then
* last error will be OUTPUT_BUFFER_TOO_SMALL. */
std
::
size_t
sha256
(
std
::
uint8_t
const
*
input
,
std
::
size_t
input_length
,
std
::
uint8_t
*
output
,
std
::
size_t
output_length
);
/** Verify a ed25519 signature. Returns std::size_t(0) on success. Returns
* std::size_t(-1) on failure or if the signature was invalid. On failure
* last_error will be set with an error code. If the signature was too short
* or was not a valid signature then last_error will be BAD_MESSAGE_MAC. */
std
::
size_t
ed25519_verify
(
Ed25519PublicKey
const
&
key
,
std
::
uint8_t
const
*
message
,
std
::
size_t
message_length
,
...
...
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