Documentation ¶
Index ¶
Constants ¶
View Source
const EncryptorPasswordLength = 32
View Source
const MaxCookieValueSize = 2048
MaxCookieValueSize We need to make sure that the final encrypted string is smaller than 4096, as this is the maximum cookie size for some browsers. The encryption that is used via securecookie performs a base64 encoding, which increases the original message size by a factor of 4/3. Additionally, it adds a HMAC authentication key of roughly 20 characters. Finally, the encryption process is a stream cipher, which should guarantee an encrypted output of the same size as the input (unless a block padding is added). If we are to split the original text at 2048, we should have sufficient room for encryption and the final result should be below 4096.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.