Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • L libpep-cpp
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bernard van Gastel
  • libpep-cpp
  • Merge requests
  • !2

Draft: Remove the sha512 libsodium include from base.h

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Hans Harmannij requested to merge jharmannij/libpep:remove-external-sodium-dependency into main Aug 30, 2022
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 2

This merge requests moves some implementation details to the cpp, such that we no longer need to include sodium/crypto_hash_sha512.h in the header file.

It now allocates the sha512 context on the heap, instead of the stack. Not calling _SHA512Final, will result in the context not being cleaned up, and thus a memory leak. But I think that's OK, since the _SHA512Init, and _SHA512Final functions are not part of the public API, and we only use them in one place, were both of them are called. It also wouldn't make sense to call _SHA512Init without calling _SHA512Final, so I don't expect errors with this in the future.

Edited Sep 02, 2022 by Hans Harmannij
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: remove-external-sodium-dependency