{
    "Function": "verify",
    "File": "src/Verification.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [
        "ecrecover(bytes32,uint8,bytes32,bytes32)",
        "keccak256(bytes)",
        "mload(uint256)",
        "mload(uint256)",
        "byte(uint256,uint256)",
        "require(bool,string)",
        "mload(uint256)",
        "abi.encodePacked()"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function verify(\n        bytes32 msgHash, \n        bytes memory signature,\n        address signer\n    ) \n        public \n        pure \n        returns(bool) \n    {\n        require(signature.length == 65, \"invalid signature length\");\n\n        bytes32 r;\n        bytes32 s;\n        uint8 v;\n\n        assembly {\n            /*\n            First 32 bytes stores the length of the signature\n\n            add(sig, 32) = pointer of sig + 32\n            effectively, skips first 32 bytes of signature\n\n            mload(p) loads next 32 bytes starting at the memory address p into memory\n            */\n\n            // first 32 bytes, after the length prefix\n            r := mload(add(signature, 32))\n            // second 32 bytes\n            s := mload(add(signature, 64))\n            // final byte (first byte of the next 32 bytes)\n            v := byte(0, mload(add(signature, 96)))\n        }\n        bytes memory prefix = \"\\x19Ethereum Signed Message:\\n32\";\n        bytes32 prefixedHash = keccak256(abi.encodePacked(prefix, msgHash));\n        return ecrecover(prefixedHash, v, r, s) == signer;\n    }"
}