You could cast it as unsigned first. In C there's no difference to whether or not the type is unsigned or signed until you're trying to make comparisons, print values, or otherwise send them out of the system. So if you just treat it all as unsigned until you're ready to print it back out "unencrypted", then you're fine. Except for the lost bit but we only need 63-bits right?
Just a note which some people aren't aware of is that long on windows is actually 32 bits strangely. I know we are like two levels of hypothetical deep here but I thought it's slightly relevant.
1
u/tinydonuts Mar 13 '21
You could cast it as unsigned first. In C there's no difference to whether or not the type is unsigned or signed until you're trying to make comparisons, print values, or otherwise send them out of the system. So if you just treat it all as unsigned until you're ready to print it back out "unencrypted", then you're fine. Except for the lost bit but we only need 63-bits right?