亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? test.java

?? Serpent算法及vb實現 畢業設計是做的 希望對大家有幫助
?? JAVA
字號:
// $Id: $//// $Log: $// Revision 1.0  1998/04/06  raif// + original version based on cryptix.tools.KAT.//// $Endlog$/* * Copyright (c) 1998 Systemics Ltd on behalf of * the Cryptix Development Team. All rights reserved. */package NIST;import java.io.File;import java.io.FileWriter;import java.io.IOException;import java.io.PrintWriter;import java.lang.reflect.InvocationTargetException;import java.lang.reflect.Method;import java.util.StringTokenizer;/** * For a designated candidate AES block cipher algorithm, this command * tests the speed of encryption.<p> * * This code processes the user's request using NIST Basic API.<p> * * <b>Copyright</b> &copy; 1998 * <a href="http://www.systemics.com/">Systemics Ltd</a> on behalf of the * <a href="http://www.systemics.com/docs/cryptix/">Cryptix Development Team</a>. * <br>All rights reserved.<p> * * <b>$Revision: $</b> * @author  Raif S. Naffah * changed to NIST.test (from NIST.KAT) by E.B. */public final class test{// main method//...........................................................................        public static void main (String[] args) {        System.out.println(            "measures NIST AES cipher speed\n\n");        test cmd = new test();        cmd.processOptions(args);        cmd.run();    }// Fields & constants//...........................................................................    static final String VERSION = "$Revision: 1.0$";    static final String SUBMITTER = "<as stated on the submission cover sheet>";    // current values of switches as set from the command line arguments    boolean varKey = false ;  // -k  generate variable-key data    boolean varText = false ; // -t  generate variable-text data    String dirName = null;    // -d  output directory if != user.dir    String keylengths = null; // -l  comma-separated key lengths    String cipherName = null; // cipher algorithm name, default == provider    File destination = null;  // destination directory File object    int[] keys = new int[] {128, 192, 256}; // key-length values to test with        final String vkFileName = "ecb_vk.txt"; // variable-key output filename    final String vtFileName = "ecb_vt.txt"; // variable-text output filename    // statistics fields    long encBlocks; // total count of encrypted blocks    long decBlocks; // total count of decrypted blocks    long keyCount;  // total count of key creation requests    Method makeKey = null; // reference to makeKey([B)    Method encrypt = null; // reference to blockEncrypt([B, int, int)    Method decrypt = null; // reference to blockDecrypt([B, int, int)// Own methods//...........................................................................    /** Process command line arguments and initialise instance fields. */    private void processOptions (String[] args) {        int argc = args.length;        if (argc == 0)            printUsage();        System.out.println(            "(type \"java NIST.test\" with no arguments for help)\n\n");        int i = -1;        String cmd = "";        boolean next = true;        while (true) {            if (next) {                i++;                if (i >= argc)                    break;                else                    cmd = args[i];            } else                cmd = "-" + cmd.substring(2);                        if (cmd.startsWith("-k")) {                varKey = true;                next = (cmd.length() == 2);            } else if (cmd.startsWith("-t")) {                varText = true;                next = (cmd.length() == 2);            } else if (cmd.startsWith("-l")) {       // key lengths                keylengths = args[i + 1];                i++;                next = true;            } else if (cmd.startsWith("-d")) {       // destination directory                dirName = args[i + 1];                i++;                next = true;            } else // it's the cipher                cipherName = cmd;        }        // sanity checks        if (cipherName == null)            halt("Missing cipher algorithm name");        if (cipherName.length() > 1 &&                (cipherName.startsWith("\"") || cipherName.startsWith("'")))            cipherName = cipherName.substring(2, cipherName.length() - 2);        if (keylengths != null) {            int count = 0;            int k;            int[] keystemp = new int[3]; // maximum allowed            StringTokenizer st = new StringTokenizer(keylengths, ", \t\"");            while (st.hasMoreTokens()) {                k = Integer.parseInt(st.nextToken());                if (k <= 0)                    halt("Negative key length not allowed: "+k);                if (count == 3)                    halt("Only three key-length values are allowed.");                keystemp[count++] = k;            }            if (count != 0) {                keys = new int[count];                System.arraycopy(keystemp, 0, keys, 0, count);            }        }        if (!varKey && !varText)            varKey = varText = true;        if (dirName == null)            dirName = System.getProperty("user.dir");        destination = new File(dirName);        if (! destination.isDirectory())            halt("Destination <" + destination.getName() +                "> is not a directory");        String aes = cipherName + "." + cipherName + "_Algorithm";        try {            Class algorithm = Class.forName(aes);            // inspect the _Algorithm class            Method[] methods = algorithm.getDeclaredMethods();            for (i = 0; i < methods.length; i++) {                String name = methods[i].getName();                int params = methods[i].getParameterTypes().length;                if (name.equals("makeKey") && (params == 1))                    makeKey = methods[i];                else if (name.equals("blockEncrypt") && (params == 3))                    encrypt = methods[i];                else if (name.equals("blockDecrypt") && (params == 3))                    decrypt = methods[i];            }            if (makeKey == null)                throw new NoSuchMethodException("makeKey()");            if (encrypt == null)                throw new NoSuchMethodException("blockEncrypt()");            if (decrypt == null)                throw new NoSuchMethodException("blockDecrypt()");        } catch (ClassNotFoundException x1) {            halt("Unable to find "+aes+" class");        } catch (NoSuchMethodException x2) {            halt("Unable to find "+aes+"."+x2.getMessage()+" method");        }    }    /**     * Print an error message to System.err and halts execution returning     * -1 to the JVM.     *     * @param s  A message to output on System.err     */    static void halt (String s) {        System.err.println("\n*** "+s+"...");        System.exit(-1);    }    /**     * Write a notification message to System.out.     *     * @param s  String to output to System.out.     */    static void notify (String s) { System.out.println("test: "+s+"..."); }        /** write help text and quit. */    void printUsage() {        System.out.println(        "NAME\n" +        "  test: measures the speed of an AES cipher algorithm.\n\n" +        "SYNTAX\n" +        "  java NIST.test\n" +        "    <cipher>\n\n" +        "OPTIONS\n" +        "  <cipher>\n" +        "       Cipher algorithm name.\n\n");        System.exit(0);    }    /** main action. */    void run() {        long time = System.currentTimeMillis();        notify("Java interpreter used: Version "+System.getProperty("java.version"));        notify("Java Just-In-Time (JIT) compiler: "+System.getProperty("java.compiler"));        notify("");        notify("Encrypting 10000 blocks:");	try {	  teste();	} catch (Exception x) {            halt("Exception encountered in a " + cipherName +                "_Algorithm method:\n" + x.getMessage());        }        // print timing and stats info        notify("Total encryption time (ms): "+(System.currentTimeMillis() - time));        notify("");        notify("Decrypting 10000 blocks:");	time = System.currentTimeMillis();	try {	  testd();	} catch (Exception x) {            halt("Exception encountered in a " + cipherName +                "_Algorithm method:\n" + x.getMessage());        }        // print timing and stats info        notify("Total decryption time (ms): "+(System.currentTimeMillis() - time));    }//...........................................................................    void teste ()    throws IllegalAccessException, InvocationTargetException {        Object[] args = {};         //actual arguments        int count = 10000;    // number of trial encryptions        byte[] keyMaterial = new byte[16];        byte[] pt = new byte[16];   // plaintext (16=default AES block size)        byte[] cpt;                 // computed plaintext        byte[] ct;                  // ciphertext        int round = 0;              // current round ord. number        Object skeys;               // algorithm secret key        	args = new Object[] { keyMaterial };	skeys = makeKey.invoke(null, args);        	for (int i = 0; i < count; i++) {	  args = new Object[] {pt, new Integer(0), skeys};	  pt = (byte[]) encrypt.invoke(null, args);        }    }    void testd ()    throws IllegalAccessException, InvocationTargetException {        Object[] args = {};         //actual arguments        int count = 10000;    // number of trial encryptions        byte[] keyMaterial = new byte[16];        byte[] pt = new byte[16];   // plaintext (16=default AES block size)        byte[] cpt;                 // computed plaintext        byte[] ct;                  // ciphertext        int round = 0;              // current round ord. number        Object skeys;               // algorithm secret key        	args = new Object[] { keyMaterial };	skeys = makeKey.invoke(null, args);        	for (int i = 0; i < count; i++) {	  args = new Object[] {pt, new Integer(0), skeys};	  pt = (byte[]) decrypt.invoke(null, args);        }    }// utility static methods// (copied from cryptix.util.core ArrayUtil and Hex classes)//...........................................................................        /**     * Compares two byte arrays for equality.     *     * @return true if the arrays have identical contents     */    private static boolean areEqual (byte[] a, byte[] b) {        int aLength = a.length;        if (aLength != b.length)            return false;        for (int i = 0; i < aLength; i++)            if (a[i] != b[i])                return false;        return true;    }    private static final char[] HEX_DIGITS = {        '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'    };    /**     * Returns a string of hexadecimal digits from a byte array. Each     * byte is converted to 2 hex symbols.     */    private static String toString (byte[] ba) {        int length = ba.length;        char[] buf = new char[length * 2];        for (int i = length, j = 0, k; i > 0; ) {            k = ba[--i];            buf[j++] = HEX_DIGITS[(k >>> 4) & 0x0F];            buf[j++] = HEX_DIGITS[ k        & 0x0F];        }        return new String(buf);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区三区国产| 国产主播一区二区三区| 国产调教视频一区| 欧美成人免费网站| av综合在线播放| 国产精品一区在线观看你懂的| 国产日韩成人精品| 色视频成人在线观看免| 美女视频黄久久| 欧美高清一级片在线观看| 欧美国产成人精品| 欧美自拍偷拍一区| 欧美电影在哪看比较好| 日韩一区和二区| 久久久久久一级片| 国产精品国产精品国产专区不蜜 | 国产亚洲美州欧州综合国| 精品奇米国产一区二区三区| 日韩精品中文字幕在线不卡尤物| 白白色 亚洲乱淫| 在线免费观看成人短视频| 欧美日韩国产色站一区二区三区| 成人免费观看男女羞羞视频| 成人激情小说乱人伦| 麻豆精品一二三| 亚洲综合另类小说| 国产精品美女www爽爽爽| 亚洲精品videosex极品| 日韩高清不卡一区| 懂色av中文一区二区三区| 日韩精品一二三| 国产一区二区三区免费观看 | 欧美男人的天堂一二区| 日韩一区二区三区电影在线观看| 色哟哟一区二区三区| 欧美精三区欧美精三区| 欧美在线啊v一区| 精品入口麻豆88视频| 18欧美亚洲精品| 久久99国产精品麻豆| 在线视频综合导航| 在线精品视频免费播放| 精品国产网站在线观看| 国产精品福利av| 久久国产精品区| 欧美性大战久久久久久久蜜臀 | 欧美午夜不卡视频| 精品国产自在久精品国产| 亚洲青青青在线视频| 国产美女精品人人做人人爽| 欧洲色大大久久| 亚洲欧洲国产日本综合| 久久99这里只有精品| 欧美午夜精品久久久久久超碰| 日本韩国欧美国产| 欧美国产日韩在线观看| 久久99国产乱子伦精品免费| 久久99精品国产麻豆不卡| 国产一区二区三区久久悠悠色av | 久久女同精品一区二区| 五月开心婷婷久久| 91福利在线免费观看| 国产精品久久久久久久浪潮网站| 亚洲人一二三区| 国产精品18久久久久久久久久久久| 国产成人av影院| 精品国产乱码久久久久久图片| 久久精品在这里| 国产真实乱子伦精品视频| 欧美一区中文字幕| 日韩高清不卡一区二区| 欧美精品少妇一区二区三区| 亚洲一区二区在线播放相泽 | 狠狠狠色丁香婷婷综合激情| 欧美日韩一区三区| 亚洲一区视频在线观看视频| 日本韩国精品在线| 一区二区三区资源| 欧洲一区二区三区在线| 亚洲精品亚洲人成人网 | 国产suv精品一区二区6| 国产视频一区在线观看| 成人一区二区在线观看| 国产精品丝袜久久久久久app| 亚洲精品自拍动漫在线| 免费成人在线播放| 久久天堂av综合合色蜜桃网| 国产一区欧美二区| 综合自拍亚洲综合图不卡区| 91丨porny丨首页| 欧美成人精品3d动漫h| 国内精品国产成人国产三级粉色| 一本色道久久综合亚洲aⅴ蜜桃| 欧美一区二区黄| 国产一区二区三区在线观看免费视频 | 亚洲美女一区二区三区| 在线日韩av片| 蜜臀av一区二区在线免费观看 | 亚洲国产一区二区三区| 337p亚洲精品色噜噜噜| 国产一区二区美女诱惑| 国产色产综合产在线视频| 99久久国产综合色|国产精品| 精品捆绑美女sm三区| 成人综合婷婷国产精品久久蜜臀| 日韩三级免费观看| 国产成人免费在线观看不卡| 欧美一级日韩免费不卡| 国产成人精品亚洲午夜麻豆| 依依成人精品视频| 久久综合一区二区| 欧美在线视频不卡| 成人中文字幕电影| 日韩高清欧美激情| 国产精品日韩精品欧美在线| 欧美日韩国产欧美日美国产精品| 亚洲视频资源在线| 日韩精品中文字幕一区二区三区| 三级影片在线观看欧美日韩一区二区| 99国产精品久久久久久久久久久| 久久亚洲精华国产精华液| 一本一道综合狠狠老| 国产资源在线一区| 婷婷丁香激情综合| 一区二区中文视频| 91麻豆国产在线观看| 九色|91porny| 午夜天堂影视香蕉久久| 国产精品激情偷乱一区二区∴| 懂色av一区二区夜夜嗨| 日韩国产精品久久久久久亚洲| 91麻豆精品91久久久久同性| 波多野结衣91| 国产一区 二区 三区一级| 视频一区免费在线观看| 亚洲日本va午夜在线电影| 国产日韩欧美高清| 欧美大片国产精品| 欧美一卡二卡在线| 国产精品一区免费视频| 国产精品网站在线播放| 欧美r级电影在线观看| 欧美一区二区女人| 欧美丝袜丝nylons| 欧美亚洲尤物久久| 91麻豆swag| 色综合咪咪久久| 一本大道久久精品懂色aⅴ| 成人在线综合网站| 国产成人综合在线| 一区二区在线观看视频在线观看| 欧美日韩一级片在线观看| 91免费国产视频网站| a美女胸又www黄视频久久| 成人一区二区在线观看| eeuss鲁一区二区三区| 天堂午夜影视日韩欧美一区二区| 久久婷婷色综合| 欧美综合天天夜夜久久| 在线观看视频91| 777精品伊人久久久久大香线蕉| 国产在线观看一区二区| 国产精品538一区二区在线| 成人午夜私人影院| 日韩电影在线一区二区三区| 午夜伦理一区二区| 蓝色福利精品导航| 国产伦精品一区二区三区免费迷| 亚洲第一电影网| 日韩电影在线免费看| 亚洲男人的天堂一区二区| 精品国产区一区| 制服丝袜亚洲色图| 精品裸体舞一区二区三区| 国产日韩欧美精品在线| 亚洲三级免费观看| 亚洲成人在线免费| 国产在线精品一区二区不卡了 | 精品日韩在线观看| 欧美天天综合网| 日韩三级视频中文字幕| 国产午夜精品一区二区三区四区| 欧美日韩免费电影| 欧美va亚洲va| 日韩写真欧美这视频| 日本一区二区三区视频视频| 亚洲色图制服诱惑| 日韩精品亚洲一区二区三区免费| 国产精品理伦片| 国产精品污污网站在线观看| 亚洲一区在线观看网站| 亚洲日本护士毛茸茸| 亚洲成人一二三| 亚洲午夜激情av| 亚洲欧美另类久久久精品2019| 中文字幕av不卡| 丝袜美腿成人在线| av激情成人网| 精品国产成人系列| 亚洲第一会所有码转帖|