# -*- coding:utf-8 -*-
# Filename: main.py
# Author:hankcs
from jpype import *
import jpype
import os.path
import json
#jarpath = os.path.join(os.path.abspath('.'), 'C:\\jiami\\sinosun_security\\sinosun_security\\com\\sinosun\\sinosun_security\\util\\SecurityUtil.class')
jarpath = os.path.join(os.path.abspath('.'), 'C:\\jiami\\sinosun_security\\sinosun_security.jar')
dependency = os.path.join(os.path.abspath('.'), 'C:\\jiami\\sinosun_security')
jpype.startJVM('D:\\jre-8u151-windows-i586\\jre1.8.0_151\\bin\\client\\jvm.dll', "-ea", "-Djava.class.path=%s" %jarpath,"-Djava.ext.dirs=%s" %dependency)
jiami= jpype.JClass('com.sinosun.sinosun_security.util.SecurityUtil')
XX= jpype.JClass('com.sinosun.sinosun_security.service.SinosunDataHandleService')
zip = ""
print(zip)
eyibcKey = "app"
data= '{"userPhone":"15760926200","userPwd":"123456","terType":"0","verifyCode":"000000","IMEI":"123"}'
symKey = str(jiami.getRandom(20))
print(symKey)
bdata = XX.getRequestBData(symKey,zip,eyibcKey,data)
print(bdata)
shutdownJVM()