예제 #1
0
        static public void Main(String[] args)
        {
            // .net 导入私钥的接口与 openssl 不一致
            // 这里私钥需要把下载到 pem 文件中的头尾去掉
            string privKeyContent = "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgkTfHxPa8YusG+va8"
                                    + "1CRztNQBOEr90TBEjlQBZ5d1Y0ChRANCAAS9isP/xLib7EZ1vS5OUy+gOsYBwees"
                                    + "PMDvWiTygPAUsGZv1PHLoa0ciqsElkO1fMGwNrzOKJx1Oo194Ri+SypV";
            TLSSigAPI api = new TLSSigAPI(1400000000, privKeyContent, "");

            Console.WriteLine(api.genSig("xiaojun"));
            Console.ReadKey();
        }
예제 #2
0
        public string GetSig(string identifier, int expire)
        {
            TLSSigAPI api = new TLSSigAPI(1400000000, priKeyContent, pubKeyContent);

            return(api.genSig(identifier, expire));
        }
예제 #3
0
        public string GetSig(string identifier)
        {
            TLSSigAPI api = new TLSSigAPI(sdkappid: sdkAppid, priKeyContent, pubKeyContent);

            return(api.genSig(identifier));
        }