go.secrets

Package secrets creates low-level heap-allocated buffers safe for the storage of cryptographic secrets. A Secret is protected from being read from, written to, or executed once allocated. They are prevented from being paged out to swap (although systems that hibernate will be able to bypass this restriction), they have guard pages and a canary to protect against buffer overflows and underflows, and their contents are automatically zeroed when they become garbage collected. A Secret attempts to protect memory contents pessimistically. If the memory cannot be protected during initialization, no memory will be allocated and an error will be returned. If memory protections cannot be maintained during the lifespan of an existing Secret, the library will panic. The use of this package should be limited to storing cryptographic secrets. In order to provide the promised protections, allocations are significantly larger than the amount of memory requested and the number of operations during allocation is more than with typical allocators like malloc. Examples

MIT License

Stars
13

No README available, please check again later.

Package Rankings
Top 8.17% on Proxy.golang.org