> I'm porting a small cryptography class from Java and it's used there
> multiple times. I have no idea how to get the same effect in Go.
That's unsigned shift, right? Zero fill? If you right shift an unsigned integer, Go will zero-fill. If you right shift a signed integer, it will sign-fill. If you need zero fill and you have a signed integer, just convert it to unsigned before shifting.
-rob
> Do you mean like this?
>
> "c.var1 >>> 6" becomes "uint32(c.var1) >> 6"
Yes, but I bet it's easier just to make c.var1 a uint32 when it's declared. Java is hampered by the lack of unsigned integers. Go is not.
-rob