Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at
pragma solidity ^0.4.0;
contract AudioAuthenticity {
string constant wavehash = "dea7db275ee984f7f4bf0e2b5ba77aa428e780ca5fda49435960c7fef1b4b94b";
string constant mp3hash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
function checkMp3VersionHash(string hashInput)public returns(bool){
bool result = compareHashes(hashInput, mp3hash);
return result;
function compareHashes (string a, string b) private view returns (bool){
return keccak256(a) == keccak256(b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment