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

正文內(nèi)容

a5-1加密算法論文-資料下載頁

2025-06-28 07:18本頁面
  

【正文】 文本框 Button strButton, fileButton, scan1Button, scan2Button。//加解密按鈕、文件瀏覽按鈕 FileDialog fileLoad, fileSave。//打開文件對話框、保存文件對話框 //構(gòu)造方法 MyWindow( String title ) { setTitle( title )。//設(shè)置標(biāo)題 Toolkit tool = getToolkit()。//返回此對象的引用 Dimension dim = ()。//含有屏幕寬,高的Dimension對象 int width = 。//設(shè)置界面寬度 setBounds( width, 100, 650, 300 )。//屏幕上的位置 setResizable( false )。//不可調(diào)整窗口大小 setLayout( null )。//設(shè)置頁面布局 setBackground( new Color( 82, 169, 248 ) )。//設(shè)置背景顏色 //盒式布局對象的初始化 stringBox = ()。//列式盒式布局 textBox = ()。 messageBox = ()。 file1Box = ()。//行式盒式布局 file2Box = ()。 baseBox = ()。 //文本框?qū)ο蟪跏蓟? keyText = new TextField( 15 )。//秘鑰文本框 frameText = new TextField( 15 )。//幀號文本框 str1Text = new TextField( 15 )。//需要加解密的文本框 str2Text = new TextField( 15 )。//加解密后的文本框 file1Text = new TextField( 25 )。//打開文件路徑文本框 file2Text = new TextField( 25 )。//保存文件路徑文本框 //按鈕對象初始化 strButton = new Button( 加/解密字符串 )。 fileButton = new Button( 加/解密文件 )。 scan1Button = new Button( 瀏覽文件 )。 scan2Button = new Button( 瀏覽文件 )。 //文件對話框初始化 fileSave = new FileDialog( this, 保存文件對話框, )。 fileLoad = new FileDialog( this, 打開文件對話框, )。 ( false )。//設(shè)置此文本框不可編輯的標(biāo)志 ( false )。 ( false )。 ( false )。//隱藏此組件 ( false )。 //向第一列盒式布局中添加組件 ( new Label( 秘鑰:, ) )。 ( ( 10 ) )。//設(shè)置垂直支撐高度 ( new Label( 幀號:, ) )。 ( ( 10 ) )。 ( new Label( 需要加/解密的字符串:, ) )。 ( ( 10 ) )。 ( new Label( 加/解密后的字符串:, ) )。 ( ( 10 ) )。 ( new Label( 需要加/解密的文件:, ) )。 ( ( 10 ) )。 ( new Label( 加/解密后的文件:, ) )。 ( ( 10 ) )。 ( scan1Button )。 //向?yàn)g覽文件的盒式布局中添加組件 ( file1Text )。 ( scan1Button )。 ( file2Text )。 ( scan2Button )。 ////向第二列盒式布局中添加組件 ( keyText )。 ( ( 10 ) )。 ( frameText )。 ( ( 10 ) )。 ( str1Text )。 ( ( 10 ) )。 ( str2Text )。 ( ( 10 ) )。 ( file1Box )。 ( ( 10 ) )。 ( file2Box )。 ////向第三列盒式布局中添加組件 ( new Label( (8位字符), ) )。 ( ( 10 ) )。 ( new Label( (0~262143), ) )。 ( ( 10 ) )。 ( new Label( (小于14位字符), ) )。 ( ( 10 ) )。 ( strButton )。 ( ( 10 ) )。 ( new Label( , ) )。 ( ( 13 ) )。 ( fileButton )。 ////向整體的盒式布局中添加組件 ( stringBox )。 ( ( 0 ) )。 ( textBox )。 ( ( 5 ) )。 ( messageBox )。 add( baseBox )。//在頁面上添加組件 ( 25, 50,600, 230 )。//設(shè)置組件的位置 ( this )。//打開文件對話框按鈕監(jiān)視器 ( this )。//保存文件對話框按鈕監(jiān)視器 ( this )。//字符串加解密按鈕監(jiān)視器 ( this )。//文件加解密按鈕監(jiān)視器 ( new WindowAdapter()//打開文件對話框的關(guān)閉事件 { public void windowClosing( WindowEvent e ) { ( false )。 } } )。 ( new WindowAdapter()//保存文件對話框的關(guān)閉事件 { public void windowClosing( WindowEvent e ) { ( false )。 } } )。 addWindowListener( new WindowAdapter()//界面窗口的關(guān)閉事件 { public void windowClosing( WindowEvent e ) { ( 0 )。 } } )。 setVisible( true )。//窗口可見 validate()。//窗口再次布置其子組件 }//處理事件的方法 public void actionPerformed( ActionEvent e ) { String key = ().trim()。//獲取秘鑰 String frame = ().trim()。//獲取幀號 int fInt = 0。//幀號,整數(shù)形式 //秘鑰長度不為8 if( () != 8 )//如果秘鑰的長度不符合要求 { ( this, 請輸入8位字符的秘鑰!, 警告對話框, )。 return。 } //對幀號是否為正整數(shù)而進(jìn)行判別 try { fInt = ( frame )。//轉(zhuǎn)化為整數(shù) if( fInt 0 || fInt 262143 )//幀號范圍不符合要求 { ( this, 請輸入正確范圍內(nèi)的幀號!, 警告對話框, )。 return。 } } catch( NumberFormatException nfe )//意外捕捉 { ( this, 請輸入正整數(shù)形式的幀號!, 警告對話框, )。 } //如果單擊了加密字符串按鈕 if( () == strButton ) { A5_1 a = new A5_1( key, fInt )。//A5/1加密算法初始化 ()。//產(chǎn)生秘鑰流 String str1 = ().trim()。//明文 //如果需要加解密的字符串未填寫 if( str1 == null | () == 0 ) { ( this, 請輸入需要加/解密的字符串!, 警告對話框, )。 return。 } //字符串長度超過14位字符串 else if( () 14 ) { ( this, 輸入需要加/解密的字符串過長!, 警告對話框, )。 return。 } byte ct[] = ( () )。//加解密 ( new String( ct ) )。//顯示加解密后的字符串 } //如果點(diǎn)擊加密文件按鈕 else if( () == fileButton ) { int b = 0。//讀入緩沖區(qū)的字節(jié)總數(shù) byte text[] = new byte[15]。//保存臨時(shí)的文件中的數(shù)據(jù) int i = 0。//計(jì)數(shù)器 try { File file = new File( () )。//加密文件 File copyFile = new File( () )。//加密后的文件 FileInputStream fi = new FileInputStream( file )。//文件輸入類 FileOutputStream fo = new FileOutputStream( copyFile )。//文件輸出流 ()。//創(chuàng)建加解密后保存文件 while( ( b = ( text ) ) != 1 )//如果因?yàn)橐呀?jīng)到達(dá)文件末尾而沒有更多的數(shù)據(jù),則返回 1 { A5_1 a1 = new A5_1( key, fInt + i )。//A5/1加密算法初始化 ()。//密鑰流的產(chǎn)生 text = ( text )。//加解密 ( text, 0, b )。//將加解密后的內(nèi)容讀入到文件中 ++ i。//計(jì)數(shù)器累加 } ()。//關(guān)閉此文件輸入流并釋放與此流有關(guān)的所有系統(tǒng)資源 ( this, 加/解密文件完成!, 提示對話框, )。//加密完成提示 } catch( NullPointerException npe )//空指針意外捕捉 { ( this, 文件名為空!, 警告對話框, )。 } catch( FileNotFoundException fnfe )//文件沒有找到 { ( this, 文件未找到!, 警告對話框, )。 } catch( SecurityException se )//文件讀取意外捕捉 { ( this, 拒絕對文件進(jìn)行讀取訪問!, 警告對話框, )。 } catch( IOException ioe )//文件流意外捕捉 { ( this, 發(fā)生 I/O 錯(cuò)誤!, 警告對話框, )。 }//catch }//else if //如果點(diǎn)擊打開需要加密的文件按鈕 else if( () == scan1Button ) { ( true )。//打開文件窗口 String fileDir = ()。//文件路徑 String fileName = ()。//文件名稱 if( fileName != null )//如果選中了文件 { ( fileDir + fileName )。//文件信息顯示到文本框 }//if }//else if //如果點(diǎn)擊保存加密后的文件按鈕 else if( () == scan2Button ) { ( true )。//保存文件對話框彈出 String fileDir = ()。//文件路徑 String fileName = ()。//文件名 if( fileName != null )//如果選擇了保存的文件名 { ( fileDir + fileName )。//在文本框中顯示選擇的文件路徑和文件名 }//if }//else if }}54
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1