alexcrichton/cookie-rs — pull request #7 by s-panferov (2014-11-13 13:41:09+00:00)
Title: Implement encryption.

Cookies encryption is now implemented. Code was reorganized to allow better functions reuse.

One big thing we need to discuss here is the `key` field. To encrypt a cookie we need a 32-bit key and we can:

1. Enforce clients to provide at least 32-bit key (as implemented).
2. Build a long key using a short one using repeat strategy. I think it's less secure.