mkKeyPairFromKey :: BS.ByteString -> BS.ByteString -> Bool -> (BS.ByteString, BS.ByteString)
mkKeyPairFromKey rkey k0 sw =
  let
    k1 = BS.pack $ BS.zipWith xor k0 rkey
    in
    if sw
      then (k1, k0)
      else (k0, k1)
mkKeyPairFromKey :: BS.ByteString -> BS.ByteString -> Bool -> (BS.ByteString, BS.ByteString)
mkKeyPairFromKey rkey k0 sw =
  let
    k1 = BS.pack $ BS.zipWith xor k0 rkey
    in
    if sw
      then (k1, k0)
      else (k0, k1)
mkKeyPairFromKey rkey k0 sw =
  let
    k1 = BS.pack $ BS.zipWith xor k0 rkey
    in
    if sw
      then (k1, k0)
      else (k0, k1)