freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于des加密算法的電子郵件的收發(fā)軟件的開發(fā)畢業(yè)設(shè)計(jì)(已改無錯(cuò)字)

2023-07-19 14:12:08 本頁面
  

【正文】 ).getBytes(ISO88591),GBK))。 // 郵件主題 } /********************************************************************/ (().toLocaleString())。 // 發(fā)送時(shí)間 String[] obj = getMailAttach(part, i)。 //調(diào)用獲取郵件附件的方法 message[i].getFlags().getSystemFlags().toString()。 mail_content = obj[0]。 //郵件內(nèi)容 mail_attach = obj[1]。 //郵件附件 if (mail_attach == null || ()) { mail_attach = 0。 } else { mail_attach = 1。 } (mail_attach)。 // 附件 (f)。 // 將郵件信息保存到List集合中 } } /***********************************************************************/ (false)。 //關(guān)閉郵件夾 ()。 //關(guān)閉與郵件服務(wù)器的連接 } catch (Exception e) { ()。 } return list。} 加密解密模塊設(shè)計(jì)郵件發(fā)送時(shí)在系統(tǒng)先對(duì)郵件內(nèi)容進(jìn)行加密,然后發(fā)送。收到郵件后,系統(tǒng)先進(jìn)行解密才能查看到正確的郵件內(nèi)容。加密解密代碼如下:/** * 根據(jù)參數(shù)生成 KEY */ public void setKey(String strKey) { try { KeyGenerator _generator = ( DES )。 ( new SecureRandom(()))。 this . key = ()。 _generator = null 。 } catch (Exception e) { throw new RuntimeException( Error initializing SqlMap class. Cause: + e)。 } } /** * 加密 String 明文輸入 ,String 密文輸出 */ public String encryptStr(String strMing) { byte [] byteMi = null 。 byte [] byteMing = null 。 String strMi = 。 BASE64Encoder base64en = new BASE64Encoder()。 try { byteMing = ( UTF8 )。 byteMi = this .encryptByte(byteMing)。 strMi = (byteMi)。 } catch (Exception e) { throw new RuntimeException( Error initializing SqlMap class. Cause: + e)。 } finally { base64en = null 。 byteMing = null 。 byteMi = null 。 } return strMi。 } /** * 解密 String 密文輸入 ,String 明文輸出 * * @param strMi * @return */ public String decryptStr(String strMi) { BASE64Decoder base64De = new BASE64Decoder()。 byte [] byteMing = null 。 byte [] byteMi = null 。 String strMing = 。 try { byteMi = (strMi)。 byteMing = this .decryptByte(byteMi)。 strMing = new String(byteMing, UTF8 )。 } catch (Exception e) { throw new RuntimeException( Error initializing SqlMap class. Cause: + e)。 } finally { base64De = null 。 byteMing = null 。 byteMi = null 。 } return strMing。 } /** * 加密byte明文輸入 ,byte密文輸出 * * @param byteS * @return */ private byte [] encryptByte( byte [] byteS) { byte [] byteFina = null 。 Cipher cipher。 try { cipher = ( DES )。 (Cipher. ENCRYPT_MODE , key )。 byteFina = (byteS)。 } catch (Exception e) { throw new RuntimeException( Error initializing SqlMap class. Cause: + e)。 } finally { cipher = null 。 } return byteFina。 } /** * 解密byte密文輸入 ,byte明文輸出 * * @param byteD * @return */ private byte [] decryptByte( byte [] byteD) { Cipher cipher。 byte [] byteFina = null 。 try { cipher = ( DES )。 (Cipher. DECRYPT_MODE , key )。 byteFina = (byteD)。 } catch (Exception e) { throw new RuntimeException( Error initializing SqlMap class. Cause: + e)。 } finally { cipher = null 。 } return byteFina。 } public void encryptFile(String file, String destFile) throws Exception { Cipher cipher = ( DES )。 // (, getKey())。 (Cipher. ENCRYPT_MODE , this . key )。 InputStream is = new FileInputStream(file)。 OutputStream out = new FileOutputStream(destFile)。 CipherInputStream cis = new CipherInputStream(is, cipher)。 byte [] buffer = new byte [1024]。 int r。 while ((r = (buffer)) 0) { (buffer, 0, r)。 } ()。 ()。 ()。 } /** * 文件采用 DES 算法解密文件 * */ public void decryptFile(String file, String dest) throws Exception { Cipher cipher = ( DES )。 (Cipher. DECRYPT_MODE , this . key )。 InputStream is = new FileInputStream(file)。 OutputStream out = new FileOutputStream(dest)。 CipherOutputStream cos = new CipherOutputStream(out, cipher)。 byte [] buffer = new byte [1024]。 int r。 while ((r = (buffer)) = 0) { (buffer, 0, r)。 } ()。 ()。 ()。} 聯(lián)系人模塊主要設(shè)計(jì)發(fā)送郵件需要選擇郵件人員,在本模塊可以維護(hù)常用的聯(lián)系人。 聯(lián)系人模塊頁面設(shè)計(jì)l 頁面主要代碼:table width=94% height=180 border=0 cellpadding=0 cellspacing=0 tr td align=centeramp。nbsp。/td tdamp。nbsp。/td /tr tr td width=27% align=center所 屬 組:/td td width=73%select name=groupId %for(int i=0。i()。i++){ % option value=%=(i).getId()%%=(i).getTypeName()%/option %}% /select/td /tr tr td align=center姓amp。nbsp。amp。nbsp。amp。nbsp。amp。nbsp。名:/td td input name=name type=text id=name * /td /tr tr td align=centerEmail:/td tdinput name= type=text id= size=50 * /td
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1