Skip to content

Commit

Permalink
修复部分 lint 问题
Browse files Browse the repository at this point in the history
  • Loading branch information
weijunyi committed Dec 27, 2020
1 parent a9a1fe2 commit d667ba2
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 76 deletions.
17 changes: 0 additions & 17 deletions .project

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/java/com/tencentyun/Base64URL.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ public static byte[] base64DecodeUrl(byte[] input) throws IOException {
default:
break;
}
return new BASE64Decoder().decodeBuffer(base64.toString());
return new BASE64Decoder().decodeBuffer(new String(base64));
}
}
4 changes: 2 additions & 2 deletions src/main/java/com/tencentyun/TLSSigAPIv2.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import org.json.JSONObject;

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

public TLSSigAPIv2(long sdkappid, String key) {
this.sdkappid = sdkappid;
Expand Down
11 changes: 0 additions & 11 deletions src/main/main.iml

This file was deleted.

11 changes: 0 additions & 11 deletions src/test/com/com.iml

This file was deleted.

24 changes: 7 additions & 17 deletions src/test/com/tencentyun/TLSSigAPITest.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.tencentyun;

import org.junit.Test;
import org.junit.Before;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
* TLSSigAPI Tester.
Expand All @@ -14,11 +14,11 @@
public class TLSSigAPITest {

@Before
public void before() throws Exception {
public void before() {
}

@After
public void after() throws Exception {
public void after() {
}

/**
Expand All @@ -36,9 +36,10 @@ public void testGenSigWithUserBug() {
TLSSigAPIv2 api = new TLSSigAPIv2(1400000000, "5bd2850fff3ecb11d7c805251c51ee463a25727bddc2385f3fa8bfee1bb93b5e");
System.out.println(api.genPrivateMapKey("xiaojun", 180 * 86400, 10000, 255));
}

//使用userbuf和字符串房间号生产privatemapkey
@Test
public void testGenSigWithUserBug() {
public void testGenSigWithUserBug1() {
TLSSigAPIv2 api = new TLSSigAPIv2(1400000000, "5bd2850fff3ecb11d7c805251c51ee463a25727bddc2385f3fa8bfee1bb93b5e");
System.out.println(api.genPrivateMapKeyWithStringRoomID("xiaojun", 180 * 86400, "100000000", 255));
}
Expand All @@ -47,18 +48,7 @@ public void testGenSigWithUserBug() {
* Method: hmacsha256(String identifier, long currTime, long expire)
*/
@Test
public void testHmacsha256() throws Exception {
//TODO: Test goes here...
/*
try {
Method method = TLSSigAPI.getClass().getMethod("hmacsha256", String.class, long.class, long.class);
method.setAccessible(true);
method.invoke(<Object>, <Parameters>);
} catch(NoSuchMethodException e) {
} catch(IllegalAccessException e) {
} catch(InvocationTargetException e) {
}
*/
public void testHmacsha256() {
}

}
5 changes: 0 additions & 5 deletions src/test/com/tencentyun/Untitled.java

This file was deleted.

12 changes: 0 additions & 12 deletions src/test/test.iml

This file was deleted.

0 comments on commit d667ba2

Please sign in to comment.