public boolean verifySignature(byte[] message,byte[] signature){
  short[] sigInt=new short[signature.length];
  short tmp;
  for (int i=0; i < signature.length; i++) {
    tmp=(short)signature[i];
    tmp&=(short)0xff;
    sigInt[i]=tmp;
  }
  short[] msgHashVal=makeMessageRepresentative(message);
  short[] verificationResult=verifySignatureIntern(sigInt);
  boolean verified=true;
  if (msgHashVal.length != verificationResult.length) {
    return false;
  }
  for (int i=0; i < msgHashVal.length; i++) {
    verified=verified && msgHashVal[i] == verificationResult[i];
  }
  return verified;
}

public boolean verifySignature ( byte [ ] message , byte [ ] signature ) { short [ ] sigInt = new short [ signature . length ] ; short tmp ; for ( int i = 0 ; i < signature . length ; i ++ ) { tmp = ( short ) signature [ i ] ; tmp &= ( short ) 0xff ; sigInt [ i ] = tmp ; } short [ ] msgHashVal = makeMessageRepresentative ( message ) ; short [ ] verificationResult = verifySignatureIntern ( sigInt ) ; boolean verified = true ; if ( msgHashVal . length != verificationResult . length ) { return false ; } for ( int i = 0 ; i < msgHashVal . length ; i ++ ) { verified = verified && msgHashVal [ i ] == verificationResult [ i ] ; } return verified ; }
this function verifies the signature of the message that has been updated , with the aid of the public key .
