|
|
package com.yohoufo.order;
|
|
|
|
|
|
|
|
|
import com.yohoufo.common.utils.RSAUtils;
|
|
|
import com.yohoufo.order.config.AlipayConfig;
|
|
|
import org.junit.Test;
|
|
|
import org.junit.runner.RunWith;
|
|
|
import org.junit.runners.BlockJUnit4ClassRunner;
|
|
|
|
|
|
@RunWith(BlockJUnit4ClassRunner.class)
|
|
|
public class BaseTest{
|
|
|
|
|
|
|
|
|
@Test
|
|
|
public void test(){
|
|
|
String preSignStr = "batch_no=9884287188801¬ify_id=2019031800222113643024821059927489¬ify_time=2019-03-18 11:36:43¬ify_type=batch_trans_notify&pay_account_no=20884218506361930156&pay_user_id=2088421850636193&pay_user_name=欧印南京贸易有限公司&success_details=1984_8214^2088002849778663^骆秀春^1.00^S^^201903180528078214^20190318113643|";
|
|
|
String sign = "BEDIzBQ6n7fyb4uAxH4lQt/GI9aaEY1Pxhz5tTH6q18u3Sz3ERzlnOLv1mIeD5BrFPtjDFc0R4WlUJ0a4do2/1pHd6SBP7hD3U5olP2Dw+HjoFDzlKBAueiDqOgfPpyVtrks/oZ7n5bu4jh2+XVKfN3JkMyem++yoKqEN0kQywc=";
|
|
|
String key = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQEB/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5KsiNG9zpgmLCUYuLkxpLQIDAQAB";
|
|
|
boolean res = RSAUtils.verify(preSignStr, sign, key, AlipayConfig.input_charset);
|
|
|
System.out.println(res);
|
|
|
}
|
|
|
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|