src/ecc/signature.js
function verify(data, pubkey, encoding = "utf8") {
        if (typeof data === "string") {
            data = Buffer.from(data, encoding);
        }
        assert(Buffer.isBuffer(data), "data is a required String or Buffer");
        data = hash.sha256(data);
        return verifyHash(data, pubkey);
    }
function verify(data, pubkey, encoding = "utf8") {
        if (typeof data === "string") {
            data = Buffer.from(data, encoding);
        }
        assert(Buffer.isBuffer(data), "data is a required String or Buffer");
        data = hash.sha256(data);
        return verifyHash(data, pubkey);
    }
Verify signed data.

@arg {String|Buffer} data - full data
@arg {pubkey|PublicKey} pubkey - EOSKey..
@arg {String} [encoding = 'utf8'] - data encoding (if data is a string)

@return {boolean}