package fips140cache
Import Path
crypto/internal/fips140cache (on go.dev)
Dependency Relation
imports 3 packages, and imported by 2 packages
Involved Source Files
Package fips140cache provides a weak map that associates the lifetime of
values with the lifetime of keys.
It can be used to associate a precomputed value (such as an internal/fips140
PrivateKey value, which in FIPS 140-3 mode may have required an expensive
pairwise consistency test) with a type that doesn't have private fields (such
as an ed25519.PrivateKey), or that can't be safely modified because it may be
concurrently copied (such as an ecdsa.PrivateKey).
Package-Level Type Names (only one)
Type Parameters:
K: any
V: any
Get returns the result of new, for an associated key k.
If Get was called with k before and didn't return an error, Get may return
the same value it returned from the previous call if check returns true on
it. If check returns false, Get will call new again and return the result.
The cache is evicted some time after k becomes unreachable.
![]() |
The pages are generated with Golds v0.7.7-preview. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |