Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 4.1% on proxy.golang.org
Top 4.6% dependent packages on proxy.golang.org
Top 1.6% forks on proxy.golang.org

proxy.golang.org : gopkg.in/awnumar/memguard.v0

Package memguard lets you easily handle sensitive values in memory. The number of LockedBuffers that you are able to create is limited by how much memory your system kernel allows each process to mlock/VirtualLock. Therefore you should call Destroy on LockedBuffers that you no longer need, or simply defer a Destroy call after creating a new LockedBuffer. If a function that you're using requires an array, you can cast the buffer to an array and then pass around a pointer. Make sure that you do not dereference the pointer and pass around the resulting value, as this will leave copies all over the place. The MemGuard API is thread-safe. You can extend this thread-safety to outside of the API functions by using the Mutex that each LockedBuffer exposes. Don't use the mutex when calling a function that is part of the MemGuard API though, or the process will deadlock. When terminating your application, care should be taken to securely cleanup everything.

Registry - Source - Documentation - JSON
purl: pkg:golang/gopkg.in/awnumar/memguard.v0
Keywords: crypto, cryptography, go, golang, memory, security
License: Apache-2.0
Latest release: about 5 years ago
First release: about 7 years ago
Namespace: gopkg.in/awnumar
Dependent packages: 1
Stars: 2,367 on GitHub
Forks: 118 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 29 days ago

    Loading...
    Readme
    Loading...