diff --git a/src/rsasign-1.2.js b/src/rsasign-1.2.js
index 4fb2b0cb..4f0b9d08 100644
--- a/src/rsasign-1.2.js
+++ b/src/rsasign-1.2.js
@@ -221,6 +221,26 @@ function _rsasign_getAlgNameAndHashFromHexDisgestInfo(hDigestInfo) {
return [];
}
+/**
+ * verifies a raw RSA sigature for a message string with RSA public key.
+ * @name verifyRawWithMessageHex
+ * @memberOf RSAKey#
+ * @function
+ * @param {String} sMsgHex hexadecimal string of message to be verified.
+ * @param {String} hSig hexadecimal string of raw siganture.
+ * non-hexadecimal charactors including new lines will be ignored.
+ * @return returns 1 if valid, otherwise 0
+ */
+RSAKey.prototype.verifyRawWithMessageHex = function(sMsgHex, hSig) {
+ hSig = hSig.replace(_RE_HEXDECONLY, '');
+ hSig = hSig.replace(/[ \n]+/g, "");
+ var biSig = parseBigInt(hSig, 16);
+ if (biSig.bitLength() > this.n.bitLength()) return 0;
+ var biDecryptedSig = this.doPublic(biSig);
+ var hMsgHex = biDecryptedSig.toString(16).replace(/^1f+00/, '');
+ return (hMsgHex == sMsgHex);
+};
+
/**
* verifies a sigature for a message string with RSA public key.
* @name verify