Encode encodes a cookie value.

It serializes, optionally encrypts, signs with a message authentication code, and finally encodes the value.

The name argument is the cookie name. It is stored with the encoded value. The value argument is the value to be encoded. It can be any value that can be encoded using encoding/gob. To store special structures, they must be registered first using gob.Register().

Encode is referenced in 0 repositories