anchor.diff:  ﻿open System
   open System.IO
   open System.Security.Cryptography
  +
  +let bytesToHex bytes = 
  +    bytes 
  +    |> Array.map (fun (x : byte) -> System.String.Format("{0:X2}", x))
  +    |> String.concat System.String.Empty
  +
  +let chunk chunkSize (arr : _ array) = 
  +    query {
  +        for idx in 0..(arr.Length - 1) do
  +        groupBy (idx / chunkSize) into g
  +        select (g |> Seq.map (fun idx -> arr.[idx]))
  +    } |> Seq.map (fun x -> Seq.toArray x)
  +    |> Seq.toArray
  +
  +let printAt (n:int) (bs:byte[]): unit =
  +    let cs = chunk n bs
  +    cs |> Array.iter (fun a -> printfn "%s" (bytesToHex a))
   
   let toByte (char:char) : (byte) =
       byte(char)
  
positive.code:     let bytesRead = cryptoStream.Read(result, 0, bytes.Length)
      result
  
  let encryptProfile (key:byte[]) (map:Map<string,string>) : (byte[]) =
      let blockSize = 16
      let iv = Array.zeroCreate<byte> blockSize
      let encodedCookie = encodeCookie map
  
negative.code: // foo=bar&baz=qux&zap=zazzle
  let decodeCookie (text:string) = 
      let parts = text.Split('&')
      parts |> Seq.map (fun x -> x.Split('=')) |> Seq.map (fun ps -> (ps.[0], ps.[1])) |> Seq.toArray
  
  let encodeCookie (map:List<string *string>) : (string) =
      map
      |> Seq.map (fun (k, v) ->
          let key = k.Replace("&", "").Replace("=", "")
          let value = v.Replace("&", "").Replace("=", "")
          key + "=" + value)
      |> Seq.reduce (fun a b -> a + "&" + b)
  
  