Package Usage: go: github.com/gorilla/securecookie
Package securecookie encodes and decodes authenticated and optionally
encrypted cookie values.
Secure cookies can't be forged, because their values are validated using HMAC.
When encrypted, the content is also inaccessible to malicious eyes.
To use it, first create a new SecureCookie instance:
The hashKey is required, used to authenticate the cookie value using HMAC.
It is recommended to use a key with 32 or 64 bytes.
The blockKey is optional, used to encrypt the cookie value -- set it to nil
to not use encryption. If set, the length must correspond to the block size
of the encryption algorithm. For AES, used by default, valid lengths are
16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.
Strong keys can be created using the convenience function GenerateRandomKey().
Once a SecureCookie instance is set, use it to encode a cookie value:
Later, use the same SecureCookie instance to decode and validate a cookie
value:
We stored a map[string]string, but secure cookies can hold any value that
can be encoded using encoding/gob. To store custom types, they must be
registered first using gob.Register(). For basic types this is not needed;
it works out of the box.
2 versions
Latest release: over 1 year ago
2,561 dependent packages
View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/gorilla/securecookie
Dependent Repos 5
pocs/mdl-qor-sdk
This SDK is based upon [QOR](https://github.com/qor/qor) and aims to provide a boilerplate for quickly prototyping admin types applications.Last synced: 7 months ago - Pushed: 11 months ago
systemes-dinformation/pasi-portail-d-acces-au-si
This projects presents an access portal to the user with urls to the applications he is allowed to use. To work out what those applications are, the user is logged in on a OAuth2 Identity provider and the portal get back the groups the user is memberLast synced: 7 months ago - Pushed: 11 months ago
betagouv/vouch-proxy Fork of vouch/vouch-proxy
an SSO and OAuth / OIDC login solution for Nginx using the auth_request moduleSize: 5.68 MB - Last synced: 7 days ago - Pushed: over 1 year ago

go-hep/hep
hep is the mono repository holding all of go-hep.org/x/hep packages and toolsLast synced: 7 months ago