úÎ äò     portableStable%Michael Snoyman <michael@snoyman.com>;The initialization vector used by AES in CBC mode. Should  be exactly 16 bytes long. =The keys used to store the cookies. We have an AES key used = to encrypt the cookie and a HMAC-SHA256 key used verify the ? authencity and integrity of the cookie. The AES key needs to @ have exactly 32 bytes (256 bits). The HMAC-SHA256 should have = 64 bytes (512 bits), which is the block size of SHA256, but  any size may be used.  See also  and  . *Construct an initialization vector from a .  Fails if there isn't exactly 16 bytes. 7Randomly construct a fresh initialization vector. You   should not reuse initialization vectors. The default key file.  Simply calls   . $Get a key from the given text file. =If the file does not exist or is corrupted a random key will ' be generated and stored in that file. File name where key is stored. The actual key. +Generate the given number of random bytes. Generate a random . Besides the , the   ByteString passed to   is returned so that it can be  saved for later use. Initializes a  from a random . It's  better to give a  with exactly 64 bytes, but , anything with at least 32 bytes will work. Same as  !, however randomly generates the  initialization vector for you. :Encrypt (AES-CBC), sign (HMAC-SHA256) and encode (Base64) > the given cookie data. The returned byte string is ready to  be used in a response header. Key of the server. 'New, random initialization vector (see ). Serialized cookie data. #Encoded cookie data to be given to  the client browser. 7Decode (Base64), verify the integrity and authenticity > (HMAC-SHA256) and decrypt (AES-CBC) the given encoded cookie ? data. Returns the original serialized cookie data. Fails if  the data is corrupted. Key of the server. *Encoded cookie data given by the browser. Serialized cookie data.          clientsession-0.7.2Web.ClientSessionIVKeyaesKeyhmacKeymkIVrandomIVdefaultKeyFile getDefaultKeygetKeyinitKey encryptIOencryptdecryptbytestring-0.9.2.0Data.ByteString.Internal ByteString randomBytes randomKey