0

I am using keccak hashing algorithm for converting documents to hashes, the algorithm is producing hashes like: **8185f41244d1a00110cff37b60732228623a82e7da905cac00777029887816ff**

I want to store this hash in a smart contract in bytes32 rather than string (bytes32 consumes less gas then string) but I am getting error message as: Given parameter is not bytes

1

Given parameter is not bytes

You have to add 0x at starting of your hash 8185f41244d1a00110cff37b60732228623a82e7da905cac00777029887816ff like this "0x8185f41244d1a00110cff37b60732228623a82e7da905cac00777029887816ff".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.