Ok, I found at least one silly error, in that I neglected to include the array syntax around where I'm actually doing the XOR, if I'm doing it correctly.

1
2
3
4
5
6
7
8
9
10
11
    let keyBytes = hexStringToBytes(key) in
    let comboBytes = hexStringToBytes(combo) in
    let mutable xorBytes = [||] in
    for i = 0 to keyBytes.Length - 1 do
        let kByte = keyBytes.[i] in
        let cByte = comboBytes.[i] in
        xorBytes <- Array.append xorBytes [|(kByte ^^^ cByte)|];
    done;
    let returnBytes = bytesToHexString(xorBytes) in
    returnBytes;;
By on 8/6/2007 10:21 AM ()

You want something like

Array.map2 (^^^) keyBytes comboBytes

- Greg

By on 8/6/2007 8:47 PM ()

Thanks!

By on 8/7/2007 1:53 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper