fereak 0 Newbie Poster

Hello, I'm trying to implement the SHA1 hashing algorithm in VB.NET. (Pseudocode here.)
In particular I don't quite understand this line:

'break chunk into sixteen 32-bit big-endian words w[i], 0 ≤ i ≤ 15
    for i from 16 to 79
        w[i] = (w[i-3] xor w[i-8] xor w[i-14] xor w[i-16]) leftrotate 1

Originally I thought W() are strings because they come from the original string message, but then I can't Xor strings. For the rest of the code W() are treated as numeric (being added and Xor'd) so how to I get them?

Also, for the bits where it says 'leftrotate'. I have written a function to do a circular shift to the left on any string, because I don't think VB can do this alone. But does that mean I need to convert to binary, do the shift, then convert back to decimal again?

Thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.