I'm writing a smart contract where the user sends a hashed string : the answer of an asked question (because I don"t want it to be public in the blockchain). It is compared to the correct hashed answer:
function answerQuestion(bytes32 _answer) notAnswered returns (string){
if(_answer == keccak256(answer)){
isAnswered = true;
winner = msg.sender;
return pos;
}
return "WRONG";
}
It gives me something like 57315cf71be5ffcaf957b9cc196b322e1c4d5a1832396abcee71d05d8caf41a6 and I parse it as the parameter in the browser solidity. But it returns:
Error encoding arguments: SyntaxError: Unexpected token c in JSON at position 6
Any idea how should I fix this?