Skip to content

Commit

Permalink
上传 maven 仓库
Browse files Browse the repository at this point in the history
  • Loading branch information
weijunyi committed Jun 20, 2019
1 parent fcc4b3d commit d665d46
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ dependencies {

## 使用
``` java
import com.tencentyun.TLSSigAPI;
import com.tencentyun.TLSSigAPIv2;

TLSSigAPI api = new TLSSigAPI(1400000000, "5bd2850fff3ecb11d7c805251c51ee463a25727bddc2385f3fa8bfee1bb93b5e");
TLSSigAPIv2 api = new TLSSigAPIv2(1400000000, "5bd2850fff3ecb11d7c805251c51ee463a25727bddc2385f3fa8bfee1bb93b5e");
System.out.print(api.genSig("xiaojun", 180*86400));
```
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
import javax.crypto.spec.SecretKeySpec;
import org.json.JSONObject;

public class TLSSigAPI {
public class TLSSigAPIv2 {
private long sdkappid;
private String key;

public TLSSigAPI(long sdkappid, String key) {
public TLSSigAPIv2(long sdkappid, String key) {
this.sdkappid = sdkappid;
this.key = key;
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/com/tencentyun/TLSSigAPITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ public void after() throws Exception {
*/
@Test
public void testGenSig() {
TLSSigAPI api = new TLSSigAPI(1400000000, "5bd2850fff3ecb11d7c805251c51ee463a25727bddc2385f3fa8bfee1bb93b5e");
TLSSigAPIv2 api = new TLSSigAPIv2(1400000000, "5bd2850fff3ecb11d7c805251c51ee463a25727bddc2385f3fa8bfee1bb93b5e");
System.out.print(api.genSig("xiaojun", 180*86400));
}


@Test
public void testGenSigWithUserBug() {
TLSSigAPI api = new TLSSigAPI(1400000000, "5bd2850fff3ecb11d7c805251c51ee463a25727bddc2385f3fa8bfee1bb93b5e");
TLSSigAPIv2 api = new TLSSigAPIv2(1400000000, "5bd2850fff3ecb11d7c805251c51ee463a25727bddc2385f3fa8bfee1bb93b5e");
System.out.println(api.genSigWithUserBuf("xiaojun", 180*86400, "abc".getBytes()));
}

Expand Down

0 comments on commit d665d46

Please sign in to comment.