Commit 5f10aba6 authored by Administrator's avatar Administrator
Browse files

添加登录功能

parent 6016216a
......@@ -71,7 +71,7 @@
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:name=".LoginOrEnrool"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......@@ -79,6 +79,26 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Login"
android:label="@string/login" >
</activity>
<activity
android:name=".MainActivity_1"
android:label="@string/MainActivity_1" >
</activity>
<activity
android:name=".UserManageActivity"
android:label="@string/UserManageActivity" >
</activity>
<activity
android:name=".Enrool"
android:label="@string/enrool" >
</activity>
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
</activity>
<activity
android:name=".MenuActivity"
android:label="@string/title_activity_memu" >
......
package com.szzt.transdemo;
import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class Enrool extends Activity implements View.OnClickListener {
private EditText editText1,editText2,editText3;
private Button button1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.enrool);
editText1 = findViewById(R.id.account_enrool);
editText2 = findViewById(R.id.password_enrool);
editText3 = findViewById(R.id.re_password_enrool);
button1 = findViewById(R.id.btn_login);
button1.setOnClickListener(this);
}
@Override
public void onClick(View view) {
//用户名
String username = editText1.getText().toString();
//密码
String password = editText2.getText().toString();
//确认密码
String rePassword = editText3.getText().toString();
//判断用户名、密码、确认密码是否为空
if(!TextUtils.isEmpty(username)&&!TextUtils.isEmpty(password)&&!TextUtils.isEmpty(rePassword)&& username.length() == 8 && password.length() == 8) {
MyHelper myHelper = new MyHelper(this, "information", null, 1);
SQLiteDatabase db = myHelper.getReadableDatabase();
Cursor cursor1 = db.rawQuery("select * from user where username = ?",new String[]{username});
//判断用户名是否被注册
if (cursor1.moveToNext()){
Toast.makeText(this,"此用户名已被注册,换一个试试!",Toast.LENGTH_SHORT).show();
}else {
//判断两次输入密码是否一致
if (password.equals(rePassword)){
db.execSQL("insert into user(username,password) values(?,?)",new String[]{username,password});
Cursor cursor2 = db.rawQuery("select * from user where username = ? and password = ?",new String[]{username,password});
//判断是否注册成功
if (cursor2.moveToNext()){
Toast.makeText(this,"注册成功!",Toast.LENGTH_SHORT).show();
Intent intent = new Intent();
intent.putExtra("username",username);
intent.putExtra("password",password);
setResult(RESULT_OK,intent);
finish();
}else {
Toast.makeText(this,"注册失败!",Toast.LENGTH_SHORT).show();
}
}else {
Toast.makeText(this,"确认密码与密码不相同!",Toast.LENGTH_SHORT).show();
}
}
}else {
Toast.makeText(this,"用户名、密码、确认密码都不能为空,帐号密码长度必须为8!",Toast.LENGTH_SHORT).show();
}
}
}
package com.szzt.transdemo;
import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class Login extends Activity implements View.OnClickListener {
private EditText editText1,editText2;
private Button button1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.login);
editText1 = findViewById(R.id.account_input);
editText2 = findViewById(R.id.password_input);
button1 = findViewById(R.id.btn_login);
button1.setOnClickListener(this);
}
@Override
public void onClick(View view) {
switch (view.getId()){
case R.id.btn_login: {
String username = editText1.getText().toString();
String password = editText2.getText().toString();
//判断用户是否输入了用户名、密码
if (!TextUtils.isEmpty(username) && !TextUtils.isEmpty(password) && username.length() == 8 && password.length() == 8) {
MyHelper myHelper = new MyHelper(this, "information", null, 1);
SQLiteDatabase db = myHelper.getReadableDatabase();
Cursor cursor1 = db.rawQuery("select * from user where username = ?", new String[]{username});
//判断此用户是否存在
if (username.equals("admin888") && password.equals("12345678")){//判断管理员帐号密码
Toast.makeText(this, "成功登录!", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(this,MainActivity_1.class);
startActivity(intent);
finish();
}else if (cursor1.moveToNext()) {
Cursor cursor2 = db.rawQuery("select password from user where username = ?", new String[]{username});
cursor2.moveToNext();
//判断用户输入的密码是否正确
if (cursor2.getString(0).equals(password)) {
Toast.makeText(this, "成功登录!", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(this,MainActivity.class);
startActivity(intent);
finish();
} else {
Toast.makeText(this, "密码错误!", Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(this, "抱歉,此用户不存在!", Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(this, "用户名、密码都不能为空,帐号密码长度必须为8!", Toast.LENGTH_SHORT).show();
}
}
break;
default:
break;
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode==100){
//填充用户名和密码
editText1.setText(data.getExtras().get("username")+"");
editText2.setText(data.getExtras().get("password")+"");
}
}
}
package com.szzt.transdemo;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.Toast;
public class LoginOrEnrool extends Activity implements View.OnClickListener {
private Button button1,button2;
Intent intent;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
button1 = findViewById(R.id.signin);
button1.setOnClickListener(this);
button2 = findViewById(R.id.enroll);
button2.setOnClickListener(this);
}
@Override
public void onClick(View view) {
switch (view.getId()){
case R.id.signin:
intent = new Intent(this,Login.class);
startActivity(intent);
break;
case R.id.enroll:
intent = new Intent(this,Enrool.class);
startActivity(intent);
break;
default:
break;
}
}
}
package com.szzt.transdemo;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.szzt.android.util.HexDump;
import com.szzt.android.util.SzztDebug;
import com.szzt.sdk.device.DeviceManager;
import com.szzt.sdk.device.card.MagneticStripeCardReader;
import com.szzt.sdk.device.card.SmartCardReader;
import com.szzt.sdk.device.emv.EmvInterface;
import com.szzt.sdk.device.pinpad.PinPad;
import com.szzt.sdk.system.HwSecurityManagerV2;
import org.json1.JSONObject;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class MainActivity_1 extends Activity implements View.OnClickListener {
public static final String TAG = "MainActivity";
private Button mDesButton;
private Button mAesButton;
private Button mSM4Button;
private Button btn_Two_way_authentication,btn_Setting;
private Button mDukptButton;
private Button mUnOnlineButton;
private TextView mTextView;
private TextView mPassTextView;
private Handler mHandler = new Handler(Looper.getMainLooper());
private ExecutorService mExecutorService = Executors.newScheduledThreadPool(3);
private SmartCardReader mSmartCardReader;
private MagneticStripeCardReader mStripeCardReader;
private PinPad mPinPad;
HwSecurityManagerV2 hwSecurityManagerV2;
private PBOC mPboc = new PBOC();
private boolean isInputPin = false;
private EditText mIpEditText1, mIpEditText2, mIpEditText3,mIpEditText4;
private EditText mPortEditText;
private String mIp;
private int port;
private Context mContext;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_1);
mContext = this;
hwSecurityManagerV2 = DeviceManager.getInstance().getHwSecurityManagerV2();
mIpEditText1 = (EditText)findViewById(R.id.editText_ip1);
mIpEditText2 = (EditText)findViewById(R.id.editText_ip2);
mIpEditText3 = (EditText)findViewById(R.id.editText_ip3);
mIpEditText4 = (EditText)findViewById(R.id.editText_ip4);
mPortEditText = (EditText)findViewById(R.id.editText_port);
mIpEditText1.setText("10");
mIpEditText2.setText("12");
mIpEditText3.setText("249");
mIpEditText4.setText("115");
mPortEditText.setText("9110");
mTextView = (TextView)findViewById(R.id.tv_info);
mPassTextView = (TextView)findViewById(R.id.tv_pass);
btn_Two_way_authentication = findViewById(R.id.btn_Two_way_authentication);
btn_Setting = findViewById(R.id.btn_Setting);
btn_Setting.setOnClickListener(this);
mPassTextView.setTextSize(20);
//双向认证
btn_Two_way_authentication.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mIp = mIpEditText1.getText().toString() + "." + mIpEditText2.getText().toString()
+ "." + mIpEditText3.getText().toString() + "." + mIpEditText4.getText().toString();
port = Integer.parseInt(mPortEditText.getText().toString());
new Thread(new Runnable() {
@Override
public void run() {
try {
Socket clientSocket = new Socket(mIp,port);
byte[] data = {0x02,0x08,0x00,0x01};
String msg = SSLSocketFactoryEx.sendAndRecbyte(clientSocket, data);
Log.d("gy","返回公钥与公钥自签名——>"+msg+" 长度——>"+msg.length());
if(msg.length()>0){
String publickey = msg.substring(0, 128);//服务端传来公钥
byte[] publickey_data = HexDump.hexStringToByteArray(publickey);//公钥转成字节数组
String publickeySigin = msg.substring(128);//公钥自签名数据
Log.d("gy","publickey——>"+publickey+" publikeySigin——>"+publickeySigin);
byte[] Sigin_ID = {0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08};
//PK 签名者ID
int len = Sigin_ID.length * 8;
byte[] pk = HexDump.hexStringToByteArray(HexDump.toHexString((byte)(len >> 8 & 255))+HexDump.toHexString((byte)(len & 255))+HexDump.toHexString(Sigin_ID)+"FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E9332C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");
Log.d("gy","pk->"+HexDump.toHexString(pk));
byte[] buf = new byte[64 + pk.length];
System.arraycopy(pk, 0, buf, 0, pk.length);
System.arraycopy(publickey_data, 0, buf, pk.length, 64);
Log.d("gy","buf->"+HexDump.toHexString(buf));
byte[] za = hwSecurityManagerV2.calcHash(HwSecurityManagerV2.HashType.HASH_SM3,buf, HwSecurityManagerV2.HashFlag.HASH_DIRECT);
Log.d("gy","za->"+HexDump.toHexString(za));
if (za == null) {
Log.d("gy","za->"+za);
}
byte[] src = new byte[za.length + publickey_data.length];
System.arraycopy(za, 0, src, 0, za.length);
System.arraycopy(publickey_data, 0, src, za.length, publickey_data.length);
Log.d("gy","za+publickey_data->"+HexDump.toHexString(src));
byte[] hash = hwSecurityManagerV2.calcHash(HwSecurityManagerV2.HashType.HASH_SM3, src, HwSecurityManagerV2.HashFlag.HASH_DIRECT);
Log.d("gy","hash->"+HexDump.toHexString(hash));
if (hash == null) {
Log.d("gy","hash ->"+hash);
}
int ret =hwSecurityManagerV2.importPublicKey(5,HwSecurityManagerV2.AlgType.SM2 , HexDump.hexStringToByteArray(publickey));//导入服务端公钥进终端
if(ret<0){
Log.d("gy","导入SM2公匙失败"+ret);
return;
}
boolean flag = hwSecurityManagerV2.verify2psbc(5,hash,HexDump.hexStringToByteArray(publickeySigin));
if(!flag){
Log.d("gy","验签失败");
} else {
Log.d("gy", "验签成功");
byte[] sendSigin = {0x02,0x08,0x00,0x02 };//发送签名头部
int genKey = hwSecurityManagerV2.genKey(1, HwSecurityManagerV2.AlgType.SM2, 256);//生成终端公钥
if (genKey >= 0) {
byte[] getPublicKey = hwSecurityManagerV2.getPublicKey(1);//获取终端公钥
Log.d("gy","getPublicKey——>"+HexDump.toHexString(getPublicKey));
byte[] buf_1 = new byte[64 + pk.length];
System.arraycopy(pk, 0, buf_1, 0, pk.length);
System.arraycopy( getPublicKey, 0, buf_1, pk.length, 64);
Log.d("gy","buf_1->"+HexDump.toHexString(buf_1));
byte[] za_1 = hwSecurityManagerV2.calcHash(HwSecurityManagerV2.HashType.HASH_SM3,buf_1, HwSecurityManagerV2.HashFlag.HASH_DIRECT);
Log.d("gy","za_1->"+HexDump.toHexString(za_1));
if (za_1 == null) {
Log.d("gy","za_1->"+HexDump.toHexString(za_1));
}
byte[] src_1 = new byte[za_1.length + getPublicKey.length];
System.arraycopy(za_1, 0, src_1, 0, za_1.length);
System.arraycopy(getPublicKey, 0, src_1, za_1.length,getPublicKey.length);
Log.d("gy","za_1+getPublicKey->"+HexDump.toHexString(src_1));
byte[] hash_1 = hwSecurityManagerV2.calcHash(HwSecurityManagerV2.HashType.HASH_SM3, src_1, HwSecurityManagerV2.HashFlag.HASH_DIRECT);
if (hash_1 == null) {
Log.d("gy","hash_1 ->"+HexDump.toHexString(hash_1));
}else{
Log.d("gy","hash_1 ->"+HexDump.toHexString(hash_1));
byte[] signData= hwSecurityManagerV2.sign2psbc(1,hash_1);
if(signData == null){
Log.d("gy","sign签名失败");
}else{
Log.d("gy","sign签名成功——>"+HexDump.toHexString(signData));
byte[] mergeBytes = SSLSocketFactoryEx.mergeBytes(getPublicKey, signData);
byte[] mergeBytes1 = SSLSocketFactoryEx.mergeBytes(sendSigin, mergeBytes);
Log.d("gy","公钥加签名数据——>"+HexDump.toHexString(mergeBytes1));
String Key_Data = SSLSocketFactoryEx.sendAndRecbyte(clientSocket, mergeBytes1);//终端组包公钥加签名数据发送
Log.d("gy","key_Data——>"+ Key_Data);
if(Key_Data.equals("00000000")){
Log.d("gy","上传公钥验签成功");
Log.d("gy","------------------------------------第二次认证---------------------------------------");
byte[] rdm = {0x02,0x08,0x00,0x03};//上传随机数头部数据
Random random = new Random();
byte[] r_data = new byte[16];//加密数据
for (int i = 0; i < r_data.length; i++)
r_data[i] = (byte) random.nextInt(256);
Log.d("gy","随机数——>"+HexDump.toHexString(r_data));
byte[] r_dataRdm = SSLSocketFactoryEx.mergeBytes(rdm,r_data);
String msg_Key_Data = SSLSocketFactoryEx.sendAndRecbyte(clientSocket, r_dataRdm);//将头部+随机数16个字节组包发送,返回服务端签名数据
Log.d("gy","服务端随机数加密数据——>"+ msg_Key_Data);
String rdm_16 = msg_Key_Data.substring(0, 32);//服务端传来随机数
String data_32 = msg_Key_Data.substring(0, 64);//16个字节pos上传随机数+16个字节服务器端随机数
byte[] data_32_data = HexDump.hexStringToByteArray(data_32);
String sigin_data_64 = msg_Key_Data.substring(64);//64字节随机数签名
Log.d("gy","rdm_16——>"+rdm_16);
Log.d("gy","data_32——>"+data_32);
Log.d("gy","data_32_data——>"+HexDump.toHexString(data_32_data));
Log.d("gy","sigin_data_64——>"+sigin_data_64);
//byte[] publickey_data = HexDump.hexStringToByteArray(publickey);//公钥转成字节数组
if(msg_Key_Data.length() > 0){
if(HexDump.toHexString(r_data).equals(rdm_16)){
byte[] publicKey5 = hwSecurityManagerV2.getPublicKey(5);
Log.d("gy","publicKey5->"+HexDump.toHexString(publicKey5));
byte[] buf_2 = new byte[64 + pk.length];
Log.d("gy","pk->"+HexDump.toHexString(pk));
System.arraycopy(pk, 0, buf_2, 0, pk.length);
System.arraycopy(publicKey5, 0, buf_2, pk.length, 64);
Log.d("gy","buf_2->"+HexDump.toHexString(buf_2));
byte[] za_2 = hwSecurityManagerV2.calcHash(HwSecurityManagerV2.HashType.HASH_SM3,buf_2, HwSecurityManagerV2.HashFlag.HASH_DIRECT);
Log.d("gy","za_2->"+HexDump.toHexString(za_2));
if (za_2 == null) {
Log.d("gy","za_2->"+HexDump.toHexString(za_2));
}
byte[] src_2 = new byte[za_2.length + data_32_data.length];
System.arraycopy(za_2, 0, src_2, 0, za_2.length);
System.arraycopy(data_32_data, 0, src_2, za_2.length, data_32_data.length);
Log.d("gy","za+data_32_data->"+HexDump.toHexString(src_2));
byte[] hash_2 = hwSecurityManagerV2.calcHash(HwSecurityManagerV2.HashType.HASH_SM3, src_2, HwSecurityManagerV2.HashFlag.HASH_DIRECT);
Log.d("gy","hash->"+HexDump.toHexString(hash_2));
if (hash_2 == null) {
Log.d("gy","hash ->"+HexDump.toHexString(hash_2));
}
boolean flag_1 = hwSecurityManagerV2.verify2psbc(5,hash_2,HexDump.hexStringToByteArray(sigin_data_64 ));
if(!flag_1){
Log.d("gy","验签失败");
} else {
Log.d("gy", "验签成功");
//发送0x02 0x08 0x00 0x04 + 32个字节随机数+64个字节签名 认证
byte[] getPublickey_1 = hwSecurityManagerV2.getPublicKey(1);
Log.d("gy","getPublickey_1->"+HexDump.toHexString(getPublickey_1));
byte[] buf_3 = new byte[64 + pk.length];
Log.d("gy","pk->"+HexDump.toHexString(pk));
System.arraycopy(pk, 0, buf_3, 0, pk.length);
System.arraycopy(getPublickey_1, 0, buf_3, pk.length, 64);
Log.d("gy","buf_3->"+HexDump.toHexString(buf_3));
byte[] za_3 = hwSecurityManagerV2.calcHash(HwSecurityManagerV2.HashType.HASH_SM3,buf_3, HwSecurityManagerV2.HashFlag.HASH_DIRECT);
Log.d("gy","za_3->"+HexDump.toHexString(za_3));
if (za_3 == null) {
Log.d("gy","za_3->"+HexDump.toHexString(za_3));
}
byte[] src_3 = new byte[za_3.length + data_32_data.length];
System.arraycopy(za_3, 0, src_3, 0, za_3.length);
System.arraycopy(data_32_data, 0, src_3, za_3.length, data_32_data.length);
Log.d("gy","za_3+data_32_data->"+HexDump.toHexString(src_3));
byte[] hash_3 = hwSecurityManagerV2.calcHash(HwSecurityManagerV2.HashType.HASH_SM3, src_3, HwSecurityManagerV2.HashFlag.HASH_DIRECT);
Log.d("gy","hash_3->"+HexDump.toHexString(hash_3));
if (hash_3 == null) {
Log.d("gy","hash_3 ->"+HexDump.toHexString(hash_3));
}else{
byte[] signData_1= hwSecurityManagerV2.sign2psbc(1,hash_3);
if(signData_1 == null){
Log.d("gy","签名失败");
} else {
Log.d("gy", "签名成功——>"+HexDump.toHexString(signData_1));
byte[] rdm_1 = {0x02,0x08,0x00,0x04};
byte[] r_dataRdm_1 = SSLSocketFactoryEx.mergeBytes(rdm_1, data_32_data);
byte[] sigin_data = SSLSocketFactoryEx.mergeBytes(r_dataRdm_1, signData_1);
String msg_sigin_Data = SSLSocketFactoryEx.sendAndRecbyte(clientSocket, sigin_data);
if(msg_sigin_Data.equals("00000000")){
Log.d("gy","第二次签名认证成功");
byte[] Sign_in = {0x02,0x08,0x00,0x05};//签到
String msg_Sign_in = SSLSocketFactoryEx.sendAndRecbyte(clientSocket,Sign_in );
if(msg_Sign_in != null){
Log.d("gy","签到成功后返回数据——>"+msg_Sign_in);
String MK = msg_Sign_in.substring(0, 32);
String PINK = msg_Sign_in.substring(32, 64);
String MACK = msg_Sign_in.substring(64, 96);
String DESK = msg_Sign_in.substring(96);
Log.d("gy","MK——>"+MK+" PINK——>"+PINK+" MACK——>"+MACK+" DESK——>"+DESK);
mIp = mIpEditText1.getText().toString() + "." + mIpEditText2.getText().toString()
+ "." + mIpEditText3.getText().toString() + "." + mIpEditText4.getText().toString();
port = Integer.parseInt(mPortEditText.getText().toString());
Intent intent = new Intent();
intent.setClass(MainActivity_1.this, MenuActivityKS8226.class);
intent.putExtra("mode", PinPad.Mode.MODE_SM4);
intent.putExtra("ip", mIp);
intent.putExtra("port", port);
intent.putExtra("MK", MK);
intent.putExtra("PINK", PINK);
intent.putExtra("MACK", MACK);
intent.putExtra("DESK", DESK);
startActivity(intent);
}else{
Log.d("gy","签到失败——>");
}
}else if(msg_sigin_Data.equals("00000001")){
Log.d("gy","第二次签名认证失败");
}else{
Log.d("gy","第二次签名认证返回值不对:"+msg_sigin_Data);
}
}
}
}
}else{
Log.d("gy","服务端随机数与终端随机数不一致"+HexDump.toHexString(r_data));
}
}else{
Log.d("gy","将头部+随机数16个字节组包发送-->"+ msg_Key_Data);
}
}else if(Key_Data.equals("00000001")) {
Log.d("gy","上传公钥验签失败");
}else {
Log.d("gy","其它异常-->"+Key_Data);
}
}
}
}
}
}else{