Skip to content

Instantly share code, notes, and snippets.

/Untitled
Created Feb 5, 2016

Embed
What would you like to do?
Created using soleditor: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://chriseth.github.io/browser-solidity/?gist=
contract ReadConvertUint256Bytes {
function equal(uint a) constant returns (bool) {
uint x = 0;
for (uint i = 0; i < 32; i++) {
uint b = uint(msg.data[35 - i]);
x += b * 256**i;
}
return a == x;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.