lib/crypto.js
function verify(public_key, data, signature) {
  var pubkey = bitcoinjs.ECPubKey.fromHex(public_key);
  var hash = bitcoinjs.crypto.hash256(new Buffer(data, 'hex'));
  var ecsignature = bitcoinjs.ECSignature.fromDER(new Buffer(signature, 'hex'));
  return pubkey.verify(hash, ecsignature);
}
function verify(public_key, data, signature) {
  var pubkey = bitcoinjs.ECPubKey.fromHex(public_key);
  var hash = bitcoinjs.crypto.hash256(new Buffer(data, 'hex'));
  var ecsignature = bitcoinjs.ECSignature.fromDER(new Buffer(signature, 'hex'));
  return pubkey.verify(hash, ecsignature);
}
function verify ( public_key , data , signature ) { var pubkey = bitcoinjs . ECPubKey . fromHex ( public_key ) ; var hash = bitcoinjs . crypto . hash256 ( new Buffer ( data , 'hex' ) ) ; var ecsignature = bitcoinjs . ECSignature . fromDER ( new Buffer ( signature , 'hex' ) ) ; return pubkey . verify ( hash , ecsignature ) ; }
Verify a signature on the given data

** For now assumes ec_secp256k1 **

@param {String} public_key Hex-encoded public key
@param {String} data Hex-encoded data
@param {String} signature Hex-encoded signature
Verify a signature on the given data