src/ecc/signature.js
function verifyHash(dataSha256, pubkey, encoding = "hex") {
        if (typeof dataSha256 === "string") {
            dataSha256 = Buffer.from(dataSha256, encoding);
        }
        if (dataSha256.length !== 32 || !Buffer.isBuffer(dataSha256))
            throw new Error("dataSha256: 32 bytes required");

        const publicKey = PublicKey(pubkey);
        assert(publicKey, "pubkey required");

        return ecdsa.verify(
            curve, dataSha256,
            { r: r, s: s },
            publicKey.Q
        );
    }
function verifyHash(dataSha256, pubkey, encoding = "hex") {
        if (typeof dataSha256 === "string") {
            dataSha256 = Buffer.from(dataSha256, encoding);
        }
        if (dataSha256.length !== 32 || !Buffer.isBuffer(dataSha256))
            throw new Error("dataSha256: 32 bytes required");

        const publicKey = PublicKey(pubkey);
        assert(publicKey, "pubkey required");

        return ecdsa.verify(
            curve, dataSha256,
            { r: r, s: s },
            publicKey.Q
        );
    }
Verify a buffer of exactally 32 bytes in size (sha256(text))

@arg {String|Buffer} dataSha256 - 32 byte buffer or string
@arg {String|PublicKey} pubkey - EOSKey..
@arg {String} [encoding = 'hex'] - dataSha256 encoding (if string)

@return {boolean}