hmac 接口编写完成未调试
This commit is contained in:
parent
25803c9d4f
commit
e299efe782
87
pom.xml
87
pom.xml
@ -4,7 +4,7 @@
|
||||
|
||||
<groupId>com.sunyard</groupId>
|
||||
<artifactId>sydapi4j</artifactId>
|
||||
<version>1.0.2022-SNAPSHOT</version>
|
||||
<version>1.13.20220909-1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>sydapi4j</name>
|
||||
@ -26,59 +26,11 @@
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.houbb</groupId>
|
||||
<artifactId>junitperf</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- <!– https://mvnrepository.com/artifact/org.apache.commons/commons-pool2 –>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.apache.commons</groupId>-->
|
||||
<!-- <artifactId>commons-pool2</artifactId>-->
|
||||
<!-- <version>2.11.1</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.jetbrains.kotlin</groupId>-->
|
||||
<!-- <artifactId>kotlin-test</artifactId>-->
|
||||
<!-- <version>${kotlin.version}</version>-->
|
||||
<!-- <scope>test</scope>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
|
||||
<!-- <!– https://mvnrepository.com/artifact/dom4j/dom4j –>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>dom4j</groupId>-->
|
||||
<!-- <artifactId>dom4j</artifactId>-->
|
||||
<!-- <version>1.6.1</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <!– https://mvnrepository.com/artifact/com.alibaba/fastjson –>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.alibaba</groupId>-->
|
||||
<!-- <artifactId>fastjson</artifactId>-->
|
||||
<!-- <version>1.2.80</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.jetbrains.kotlin</groupId>-->
|
||||
<!-- <artifactId>kotlin-stdlib-jdk8</artifactId>-->
|
||||
<!-- <version>${kotlin.version}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>com.sunyard</groupId>-->
|
||||
<!--<artifactId>Converter</artifactId>-->
|
||||
<!--<version>[1.0.201807251700, 1.1-SNAPSHOT)</version>-->
|
||||
<!--</dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>com.sunyard</groupId>
|
||||
<artifactId>proto</artifactId>
|
||||
<version>1.1.20221215</version>
|
||||
<version>1.0.20221215</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -87,35 +39,6 @@
|
||||
<version>5.4.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcpkix-jdk15on</artifactId>
|
||||
<version>1.65</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15on</artifactId>
|
||||
<version>1.65</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.4.M1</version>
|
||||
</dependency>
|
||||
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>club.fullstack</groupId>-->
|
||||
<!--<artifactId>serialize</artifactId>-->
|
||||
<!--<version>[1.0.201806051035, 1.1.SNAPSHOT)</version>-->
|
||||
<!--</dependency>-->
|
||||
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.github.wvengen/proguard-maven-plugin -->
|
||||
<!-- https://mvnrepository.com/artifact/com.github.wvengen/proguard-maven-plugin -->
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>sydapi4j</finalName>
|
||||
@ -149,8 +72,8 @@
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<source>6</source>
|
||||
<target>6</target>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<compilerId>groovy-eclipse-compiler</compilerId>
|
||||
<verbose>true</verbose>
|
||||
<fork>true</fork>
|
||||
@ -243,7 +166,7 @@
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>com.Sample.TestDemo</mainClass>
|
||||
<mainClass>racal.sunyard.main.Version</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptorRefs>
|
||||
|
||||
@ -728,7 +728,7 @@ public class SydApi4j implements SydApi {
|
||||
data.put("signature", sign);
|
||||
data.put("returnSign$option", 0);
|
||||
ByteBuffer bb = proto.rend(packet);
|
||||
|
||||
|
||||
synchronized(this) {
|
||||
byte[] b = this.syncSend(bb);
|
||||
bb = this.syncRead(b);
|
||||
@ -1676,7 +1676,7 @@ public class SydApi4j implements SydApi {
|
||||
|
||||
return m_certs;
|
||||
}
|
||||
|
||||
|
||||
// 测试通过
|
||||
@Override
|
||||
public RetWrap getAllCert(int dataFlag,String sqlite) throws UnsupportedEncodingException {
|
||||
@ -12409,10 +12409,12 @@ public class SydApi4j implements SydApi {
|
||||
@Override
|
||||
public byte[] attachedVerifyRD(byte[] sign) {
|
||||
RetWrap retWrap = attachedVerifyAndGetAll(sign);
|
||||
if (retWrap == null)
|
||||
if (retWrap == null) {
|
||||
return null;
|
||||
|
||||
return (byte[]) retWrap.get("oData");
|
||||
}
|
||||
return (String) retWrap.get("oData");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -12422,23 +12424,29 @@ public class SydApi4j implements SydApi {
|
||||
* @param sign 已签名数据
|
||||
* @return 返回CERT_INFO结构的证书数据
|
||||
*/
|
||||
@Override
|
||||
public X509 attachedVerifyAndGetX509(String sign) {
|
||||
return attachedVerifyAndGetX509( sign.getBytes() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public X509 attachedVerifyAndGetX509(byte[] sign) {
|
||||
RetWrap retWrap = attachedVerifyAndGetAll( sign);
|
||||
if (retWrap == null)
|
||||
|
||||
if (retWrap == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (X509) retWrap.get("x509");
|
||||
}
|
||||
|
||||
|
||||
public RetWrap attachedVerifyAndGetAll(String sign) {
|
||||
return attachedVerifyAndGetAll( sign.getBytes() );
|
||||
}
|
||||
|
||||
// 大数据兼容处理
|
||||
@Override
|
||||
public RetWrap attachedVerifyAndGetAll(byte[] sign) {
|
||||
if( sign.length > 4096 ) {
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user