Skip to content

huangjj27/TLSSigAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tencent Login Service Signature API (aka. TLSSigAPI)

v0.1.1-rc.1

Currently We provide only the TLSSigAPIv2 using HMAC-SHA256 as in describe on TecentYun document(for server use only).

Implement base on this code

Usage

use tls_sig_api::TlsSigApiVer2;
use chrono::Duration;

let mock_key = "5bd2850fff3ecb11d7c805251c51ee463a25727bddc2385f3fa8bfee1bb93b5e";
let signer = TlsSigApiVer2::new(0, mock_key);

let identifier = "10086";
let expire = Duration::hours(2);
let userbuf = "This' really a good crate!";

let digest = signer.gen_sign(identifier, expire, Some(userbuf));
println!("{}", digest);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published