IncomingWebRequestContext request = WebOperationContext.Current.IncomingRequest;
StringBuilder initString = new StringBuilder();
BBCPayParm param = new BBCPayParm();
try
{
...
string key = "";
key = pub.Substring(pub.Length - 30, 30);
param.POSID = string.IsNullOrEmpty(request.UriTemplateMatch.QueryParameters["POSID"]) ? "" : request.UriTemplateMatch.QueryParameters["POSID"].ToString();
...
{ initString.AppendFormat("POSID={0}", param.POSID); }
...
RSASig sign = new RSASig();
sign.setPublicKey(key);
bool res = sign.verifySigature(param.SIGN, initString.ToString());
}...