encryptAndSerialise :: Key -> String -> IO Text
encryptAndSerialise key msg = do
  encMsg <- encryptIO key . pack $ msg
  return $ decodeUtf8 $ fromChunks [encMsg]

-- | Parse the text of a "Cookie" header, extracting an auth token if the appropriate fields are set
encryptAndSerialise :: Key -> String -> IO Text
encryptAndSerialise key msg = do
  encMsg <- encryptIO key . pack $ msg
  return $ decodeUtf8 $ fromChunks [encMsg]

-- | Parse the text of a "Cookie" header, extracting an auth token if the appropriate fields are set
encryptAndSerialise key msg = do
  encMsg <- encryptIO key . pack $ msg
  return $ decodeUtf8 $ fromChunks [encMsg]

-- | Parse the text of a "Cookie" header, extracting an auth token if the appropriate fields are set