Skip to content
No description, website, or topics provided.
Java
Branch: master
Clone or download
Latest commit 671a5f4 Jun 30, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper 增加统一接口 Jan 24, 2019
src 调整tab键 May 7, 2019
.gitignore Initial commit Apr 11, 2018
LICENSE
README.md 修改依赖下载说明 Jun 30, 2019
build.gradle 修改 README Jan 29, 2019
gradlew
gradlew.bat tls sig api for java Apr 11, 2018
user_build.gradle 增加通过从源码构建脚本 Jun 30, 2019

README.md

使用构建工具集成

maven

<dependencies>
    <dependency>
        <groupId>com.github.tencentyun</groupId>
        <artifactId>tls-sig-api</artifactId>
        <version>1.2</version>
    </dependency>
</dependencies>

gradle

dependencies {
    compile 'com.github.tencentyun:tls-sig-api:1.2'
}

源码构建

./gradlew -b user_build.gradle build

生成的 jar 在 build/libs 下面可以找到。依赖需要自行到 release 下载。

生成 sig

默认有效期接口

import com.tls.tls_sigature.*;

GenTLSSignatureResult result = tls_sigature.genSig(140000000, "xiaojun", priKeyContent);
System.out.println(result.urlSig);

指定有效期接口

import com.tls.tls_sigature.*;

GenTLSSignatureResult result = tls_sigature.GenTLSSignatureEx(140000000, "xiaojun", priKeyContent, 24*3600*180);
System.out.println(result.urlSig);
You can’t perform that action at this time.