@Test public void testVerifyVersion() throws UnsupportedEncodingException, NoSuchAlgorithmException { boolean flag = IdentityContext.verifyVersionResponse("c1927d998894b85dfab19cbcc8aee93b", "93996", 51865L, "1287547223869", 1, "639B98FFD3B33D275238FA5B476AAD52"); Assert.assertTrue(flag); }
public static boolean verifyVersionResponse(String sercret, String appkey, Long leaseId, String timestamp, Integer versionNo, String sign) throws UnsupportedEncodingException, NoSuchAlgorithmException { StringBuilder sb = new StringBuilder(sercret); sb.append("appkey").append(appkey).append("leaseId").append(leaseId).append("timestamp").append(timestamp) .append("versionNo").append(versionNo).append(sercret); String md5 = StringUtils.upperCase(DigestUtils.md5Hex(sb.toString())); return md5.equals(sign); }
IdentityContext { public static boolean verifyVersionResponse(String sercret, String appkey, Long leaseId, String timestamp, Integer versionNo, String sign) throws UnsupportedEncodingException, NoSuchAlgorithmException { StringBuilder sb = new StringBuilder(sercret); sb.append("appkey").append(appkey).append("leaseId").append(leaseId).append("timestamp").append(timestamp) .append("versionNo").append(versionNo).append(sercret); String md5 = StringUtils.upperCase(DigestUtils.md5Hex(sb.toString())); return md5.equals(sign); } }
IdentityContext { public static boolean verifyVersionResponse(String sercret, String appkey, Long leaseId, String timestamp, Integer versionNo, String sign) throws UnsupportedEncodingException, NoSuchAlgorithmException { StringBuilder sb = new StringBuilder(sercret); sb.append("appkey").append(appkey).append("leaseId").append(leaseId).append("timestamp").append(timestamp) .append("versionNo").append(versionNo).append(sercret); String md5 = StringUtils.upperCase(DigestUtils.md5Hex(sb.toString())); return md5.equals(sign); }  }
IdentityContext { public static boolean verifyVersionResponse(String sercret, String appkey, Long leaseId, String timestamp, Integer versionNo, String sign) throws UnsupportedEncodingException, NoSuchAlgorithmException { StringBuilder sb = new StringBuilder(sercret); sb.append("appkey").append(appkey).append("leaseId").append(leaseId).append("timestamp").append(timestamp) .append("versionNo").append(versionNo).append(sercret); String md5 = StringUtils.upperCase(DigestUtils.md5Hex(sb.toString())); return md5.equals(sign); }  static boolean verifyTopResponse(String topParams, String topSession, String topSign, String appKey,
			String appSecret); static boolean verifyVersionResponse(String sercret, String appkey, Long leaseId, String timestamp,
			Integer versionNo, String sign); static String resolveParameters(String top_parameters, String keyName); }
IdentityContext { public static boolean verifyVersionResponse(String sercret, String appkey, Long leaseId, String timestamp, Integer versionNo, String sign) throws UnsupportedEncodingException, NoSuchAlgorithmException { StringBuilder sb = new StringBuilder(sercret); sb.append("appkey").append(appkey).append("leaseId").append(leaseId).append("timestamp").append(timestamp) .append("versionNo").append(versionNo).append(sercret); String md5 = StringUtils.upperCase(DigestUtils.md5Hex(sb.toString())); return md5.equals(sign); }  static boolean verifyTopResponse(String topParams, String topSession, String topSign, String appKey,
			String appSecret); static boolean verifyVersionResponse(String sercret, String appkey, Long leaseId, String timestamp,
			Integer versionNo, String sign); static String resolveParameters(String top_parameters, String keyName);  }