快速业务通道

用Kerberos为J2ME应用程序上锁,第3部分 - 建立与电子银行的安全通信(下) - 编程入门网

作者 佚名技术 来源 NET编程 浏览 发布时间 2012-06-15
+) {        cipher.processBlock(msg_digest, x*8, processedBlock, x*8);        System.arraycopy(processedBlock, x*8, decMsg_checksum, 0, 8);        iv = new ParametersWithIV (kp, decMsg_checksum);        cipher.init (true, iv);       }     } catch(java.lang.IllegalArgumentException il){      il.printStackTrace();     }     for (int x = 0; x < msg_checksum.length; x++) {       if (!(msg_checksum[x] == decMsg_checksum[x]))        return null;     }     return new String (decryptedMsg,               msg_checksum.length,               decryptedMsg.length - msg_checksum.length);    }//decodeSecureMessage()    public byte[] getContextKey(byte keyValue[])    {     for (int i =0; i < keyValue.length; i++)       keyValue[i] ^= 0xf0;     return keyValue;    }//getContextKey

喘Kerberos葎J2ME哘喘殻會貧迄?及3何蛍 - 秀羨嚥窮徨咢佩議芦畠宥佚?和?(14)

扮寂:2011-08-05 IBM Faheem Khan

幣箭卞強咢佩哘喘殻會

厮将頼撹阻幣箭卞強咢佩哘喘殻會侭俶勣議芦畠 Kerberos 宥佚議侭嗤竣粁。?壓辛參網胎卞強咢佩 MIDlet 泌採聞喘 Kerberos 人薩字孔嬬旺嚥窮徨咢佩議捲暦匂宥佚阻。

賠汽 25?幣阻匯倖酒汽議 MIDlet?万庁亭阻幣箭卞強咢佩哘喘殻會。

賠汽 25. 匯倖幣箭卞強咢佩 MIDlet

import java.io.*; import java.util.*; import javax.microedition.lcdui.*; import javax.microedition.midlet.*; import javax.microedition.io.*; public class J2MEClientMIDlet extends MIDlet implements CommandListener, Runnable  {    private Command OKCommand = null;    private Command exitCommand = null;    private Command sendMoneyCommand = null;    private Display display = null;    private Form transForm;    private Form transResForm;    private Form progressForm;    private TextField txt_userName;    private TextField txt_password;    private TextField txt_amount;    private TextField txt_sendTo;    private StringItem si_message;    private TextField txt_label;    private SocketConnection sc;    private DataInputStream is;    private DataOutputStream os;    private DatagramConnection dc;    private KerberosClient kc;    private TicketAndKey tk;    private String realmName = "EBANK.LOCAL";    private String kdcServerName = "krbtgt";    private String kdcAddress = "localhost";    private int kdcPort = 8080;    private String e_bankName = "ebankserver";    private String e_bankAddress = "localhost";    private int e_bankPort = 8000;    private int i =0;    private byte[] response;    public J2MEClientMIDlet() {     exitCommand = new Command("Exit", Command.EXIT, 0);     sendMoneyCommand = new Command("Pay", Command.SCREEN, 1);     OKCommand = new Command("Back", Command.EXIT, 2);     display = Disp

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号