encodes and decodes authenticated and optionally encrypted cookie values.