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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? mct.java

?? Serpent算法及vb實(shí)現(xiàn) 畢業(yè)設(shè)計(jì)是做的 希望對(duì)大家有幫助
?? JAVA
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
// $Id: $//// $Log: $// Revision 1.0  1998/04/06  raif// + original version based on cryptix.tools.MCT.//// $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 * generates and exercises Monte Carlo Tests data for both Encryption * and Decryption in Electronic Codebook (ECB) and Cipher Block Chaining * (CBC) modes.<p> * * MCT's output file format is in conformance with the layout described in * Section 4 of NIST's document "Description of Known Answer Tests and Monte * Carlo Tests for Advanced Encryption Standard (AES) Candidate Algorithm * Submissions" dated January 7, 1998.<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 */public final class MCT{// main method//...........................................................................        public static void main (String[] args) {        System.out.println(            "NIST Monte-Carlo Tests data generator/exerciser\n" +            VERSION + "\n" +            "Copyright (c) 1998 Systemics Ltd. on behalf of\n" +            "the Cryptix Development Team.  All rights reserved.\n\n");        MCT cmd = new MCT();        cmd.processOptions(args);        cmd.run();    }// Constants and variables//...........................................................................    static final String VERSION = "$Revision: 1.0$";    static final String SUBMITTER = "<as stated on the submission cover sheet>";    private static final char[] HEX_DIGITS = {        '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'    };    /** Current values of switches as set from the command line arguments. */    boolean ecb = false ;        // -e  generate ECB Encrypt/Decrypt only    boolean cbc = false ;        // -c  generate CBC Encrypt/Decrypt only    boolean encrypting = false ; // -E  generate Encrypt data only    boolean decrypting = false ; // -D  generate Decrypt data only    String dirName = null;       // -d  destination directory if != user.dir    String keylengths = null;    // -l  comma-separated key lengths    String cipherName = null;    // cipher algorithm name == package    File destination = null;     // destination directory File object    int[] keys = new int[] {128, 192, 256}; // key-length values to test with    final String eeFileName = "ecb_e_m.txt"; // ECB/Encrypt output filename    final String edFileName = "ecb_d_m.txt"; // ECB/Decrypt output filename    final String ceFileName = "cbc_e_m.txt"; // CBC/Encrypt output filename    final String cdFileName = "cbc_d_m.txt"; // CBC/Decrypt output filename    // will use zeroes for fields that require initial values.    // could be replaced by random.nextBytes() using    ////    static final java.util.Random rand = new java.util.Random();    //    // or for cryptographically strong randoms use the following    ////    static final java.security.SecureRandom rand = new java.security.SecureRandom();    //    // bear in mind that initialising the latter PRNG is a lengthy process    // 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. */    void processOptions (String[] args) {        int argc = args.length;        if (argc == 0) printUsage();        System.out.println(            "(type \"java NIST.MCT\" 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("-e")) {              // ECB mode only                ecb = true;                cbc = false;                next = (cmd.length() == 2);            } else if (cmd.startsWith("-c")) {       // CBC mode only                ecb = false;                cbc = true;                next = (cmd.length() == 2);            } else if (cmd.startsWith("-E")) {       // Encrypt cases only                encrypting = true;                decrypting = false;                next = (cmd.length() == 2);            } else if (cmd.startsWith("-D")) {       // Decrypt cases only                encrypting = false;                decrypting = 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 (!ecb && !cbc)            ecb = cbc = true;        if (!encrypting && !decrypting)            encrypting = decrypting = 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 Basic API 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("MCT: "+s+"..."); }        /** write help text and quit. */    void printUsage() {        System.out.println(        "NAME\n" +        "  MCT: A Monte Carlo Tests data generator/exerciser for any AES\n" +        "  candidate cipher algorithm.\n\n" +        "SYNTAX\n" +        "  java NIST.MCT\n" +        "    [ -e | -c ]\n" +        "    [ -E | -D ]\n" +        "    [ -l <comma-separated-key-lengths>]\n" +        "    [ -d <output-directory>]\n" +        "    <cipher>\n\n" +        "DESCRIPTION\n" +        "  For a designated candidate AES block cipher algorithm, this command\n" +        "  generates and exercises Monte Carlo Tests data for both Encryption\n" +        "  and Decryption in Electronic Codebook (ECB) and Cipher Block Chaining\n" +        "  (CBC) modes.\n" +        "  MCT's output file format is in conformance with the layout described\n" +        "  in Section 4 of NIST's document \"Description of Known Answer Tests\n" +        "  and Monte Carlo Tests for Advanced Encryption Standard (AES) Candidate\n" +        "  Algorithm Submissions\" dated January 7, 1998.\n\n" +        "OPTIONS\n" +        "  -e   Generate test data for the cipher in ECB mode only.  By default\n"+        "       MCT generates both ECB and CBC test suites.\n\n" +        "  -c   Generate test data for the cipher in CBC mode only.  By default\n"+        "       MCT generates both ECB and CBC test suites.\n\n" +        "  -E   Generate Encryption data only for the cipher in one or both of\n"+        "       ECB and CBC modes depending on the first two switches.  By default\n"+        "       MCT generates both Encryption and Decryption data.\n\n" +        "  -D   Generate Decryption data only for the cipher in one or both of\n"+        "       ECB and CBC modes depending on the first two switches.  By default\n"+        "       MCT generates both Encryption and Decryption data.\n\n" +        "  -l <comma-separated-key-lengths>\n" +        "       Comma separated list (maximum of three) of key lengths to use\n" +        "       for the tests.  If omitted, the following three values are\n" +        "       assumed: 128, 192 and 256.\n\n" +        "  -d <output-directory>\n" +        "       Pathname of the directory where the output files: \"ecb_e_m.txt\",\n" +        "       \"ecb_d_m.txt\", \"cbc_e_m.txt\" and \"cbc_d_m.txt\" will be generated.\n" +        "       If this destination directory is not specified, those files will\n" +        "       be placed in the current user directory.\n\n" +        "  <cipher>\n" +        "       Cipher algorithm name.\n\n" +        "COPYRIGHT\n" +        "  Copyright (c) 1998 Systemics Ltd. on behalf of\n" +        "  the Cryptix Development Team.  All rights reserved.\n");        System.exit(0);    }    /** main action. */    void run() {        long time = System.currentTimeMillis();        if (ecb) {            if (encrypting)                ecbEncrypt(eeFileName);            if (decrypting)                ecbDecrypt(edFileName);        }        if (cbc) {            if (encrypting)                cbcEncrypt(ceFileName);            if (decrypting)                cbcDecrypt(cdFileName);        }        notify("Java interpreter used: Version "+System.getProperty("java.version"));        notify("Java Just-In-Time (JIT) compiler: "+System.getProperty("java.compiler"));        // print timing and stats info        notify("Total execution time (ms): "+(System.currentTimeMillis() - time));        notify("During this time, "+cipherName+":");        notify("  Encrypted "+encBlocks+" blocks");        notify("  Decrypted "+decBlocks+" blocks");        notify("  Created "+keyCount+" session keys");    }// ECB MCT methods//...........................................................................    void ecbEncrypt (String encName) {        PrintWriter enc = null;        File f1 = new File(destination, encName);        try {            enc = new PrintWriter(new FileWriter(f1) , true);        } catch (IOException x) {            halt("Unable to initialize <" + encName + "> as a Writer:\n" +                x.getMessage());        }        enc.println();        enc.println("=========================");        enc.println();        enc.println("FILENAME:  \"" + encName+ "\"");        enc.println();        enc.println("Electronic Codebook (ECB) Mode - ENCRYPTION");        enc.println("Monte Carlo Test");        enc.println();        enc.println("Algorithm Name: " + cipherName);        enc.println("Principal Submitter: " + SUBMITTER);        enc.println();        try {            for (int k = 0; k < keys.length; k++)                ecbEncryptForKey(keys[k], enc);        } catch (Exception x) {            halt("Exception encountered in a " + cipherName +                "_Algorithm method:\n" + x.getMessage());        }        enc.println("==========");        enc.close();    }    void ecbDecrypt (String decName) {        PrintWriter dec = null;        File f2 = new File(destination, decName);        try {            dec = new PrintWriter(new FileWriter(f2) , true);        } catch (IOException x) {            halt("Unable to initialize <" + decName + "> as a Writer:\n" +                x.getMessage());        }        dec.println();        dec.println("=========================");        dec.println();        dec.println("FILENAME:  \"" + decName+ "\"");        dec.println();        dec.println("Electronic Codebook (ECB) Mode - DECRYPTION");

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美激情在线| 成人三级伦理片| 性做久久久久久久免费看| 亚洲日本欧美天堂| 亚洲码国产岛国毛片在线| 国产精品的网站| 亚洲欧洲精品一区二区精品久久久| 26uuu精品一区二区| 久久尤物电影视频在线观看| 日韩欧美成人一区| 337p日本欧洲亚洲大胆色噜噜| 亚洲精品一区二区三区香蕉| 欧美成人乱码一区二区三区| 日韩欧美色综合| 欧美xxxx老人做受| 国产夜色精品一区二区av| 久久九九久久九九| 国产精品久久久久久久久图文区| 国产精品高潮呻吟久久| 亚洲精品中文在线观看| 亚洲大片精品永久免费| 日本不卡一区二区三区| 久久精品理论片| 高清国产一区二区| 91在线视频官网| 欧美三级视频在线观看| 欧美一个色资源| 久久综合色天天久久综合图片| 国产免费成人在线视频| 1000精品久久久久久久久| 一区二区视频在线看| 日韩成人精品在线| 国产美女av一区二区三区| 国产成人免费网站| 色欧美片视频在线观看在线视频| 欧美三级午夜理伦三级中视频| 日韩三级免费观看| 国产欧美va欧美不卡在线| 亚洲乱码中文字幕| 日韩av一区二区在线影视| 国产一区二区三区| 一本色道久久综合狠狠躁的推荐| 欧美日韩免费观看一区二区三区 | 激情国产一区二区| 成人精品高清在线| 91精品在线一区二区| 国产午夜亚洲精品羞羞网站| 亚洲图片欧美视频| 国内一区二区视频| 色8久久人人97超碰香蕉987| 欧美成人猛片aaaaaaa| 亚洲精品视频在线| 久久精工是国产品牌吗| 99re这里都是精品| 欧美精品一区男女天堂| 亚洲综合偷拍欧美一区色| 国产一区视频导航| 欧美日韩一区成人| 国产免费成人在线视频| 日本中文字幕一区二区有限公司| 成人性生交大片免费看中文| 8x福利精品第一导航| 亚洲欧美怡红院| 精品一区二区三区不卡 | 欧美成人国产一区二区| 亚洲少妇30p| 国产乱码字幕精品高清av| 欧美伦理影视网| 中文字幕亚洲一区二区va在线| 午夜精品视频一区| 91美女片黄在线观看| 久久婷婷色综合| 天天做天天摸天天爽国产一区| 99久久精品国产麻豆演员表| 2020国产成人综合网| 日韩精品一二区| 在线视频一区二区免费| 亚洲欧美一区二区在线观看| 国产精品一区在线| 日韩欧美第一区| 亚洲高清视频中文字幕| 91浏览器在线视频| 国产精品高清亚洲| 国产成人综合自拍| 精品成人一区二区三区| 天天操天天干天天综合网| 97国产一区二区| 中文字幕在线观看一区二区| 国产精品一区在线观看你懂的| 日韩欧美综合一区| 日韩精品午夜视频| 欧美日免费三级在线| 亚洲美女少妇撒尿| 99久久精品免费看国产| 国产精品福利一区二区三区| 国产91富婆露脸刺激对白| 久久久久久一二三区| 国产综合色产在线精品| 精品乱人伦小说| 狠狠色综合日日| 久久亚洲影视婷婷| 国产精品一区二区免费不卡| 久久亚洲捆绑美女| 国产成人免费网站| 国产欧美日韩卡一| 成人性生交大片免费看中文| 国产精品美女一区二区| 不卡在线观看av| 亚洲欧洲精品一区二区三区 | 91丨porny丨首页| 国产精品国产三级国产普通话三级| 国产老肥熟一区二区三区| 久久亚洲欧美国产精品乐播| 国产精品影视网| 亚洲国产电影在线观看| 成人h动漫精品一区二| 亚洲欧洲99久久| 日本丶国产丶欧美色综合| 亚洲一二三四久久| 91麻豆精品国产91久久久久| 美国十次了思思久久精品导航| 精品盗摄一区二区三区| 成人美女在线视频| 亚洲男同1069视频| 欧美日本视频在线| 精品一区二区免费视频| 26uuu国产日韩综合| 国v精品久久久网| 一区二区三区在线视频播放| 777精品伊人久久久久大香线蕉| 蜜臀a∨国产成人精品| 国产亚洲精品超碰| 色综合久久久久网| 日本不卡一区二区三区高清视频| 久久免费美女视频| 97久久久精品综合88久久| 婷婷丁香激情综合| 国产午夜精品美女毛片视频| 91蜜桃传媒精品久久久一区二区 | 欧美影院一区二区三区| 丝袜美腿亚洲色图| 国产日本亚洲高清| 欧美亚洲国产一卡| 韩国精品主播一区二区在线观看 | 国产精品久久网站| 欧美日韩国产一级二级| 国产一区福利在线| 亚洲精品一卡二卡| 欧美精品一区二区三区在线| av电影天堂一区二区在线| 日本不卡123| 亚洲欧洲精品一区二区三区 | 91麻豆精品国产91久久久资源速度 | 成人性视频免费网站| 亚洲第一在线综合网站| 国产日韩欧美在线一区| 欧美视频在线观看一区二区| 国产精选一区二区三区| 亚洲国产综合视频在线观看| 久久久综合激的五月天| 欧美日韩精品欧美日韩精品 | 在线欧美小视频| 国产在线看一区| 亚洲最大的成人av| 久久久精品国产免费观看同学| 色老头久久综合| 福利视频网站一区二区三区| 日韩精品一卡二卡三卡四卡无卡| **性色生活片久久毛片| 欧美成人精品3d动漫h| 欧美三级乱人伦电影| 不卡在线视频中文字幕| 国产一区二区三区四| 天天操天天综合网| 一区二区三区电影在线播| 欧美激情在线一区二区| 日韩一区二区三区免费观看| 色就色 综合激情| 风间由美一区二区av101| 蜜臀av一区二区在线免费观看| 亚洲男人的天堂av| 欧美高清在线一区二区| 精品免费国产一区二区三区四区| 欧美日韩免费在线视频| 色狠狠av一区二区三区| 99久久精品一区二区| 高清久久久久久| 国产伦精品一区二区三区免费 | 国产精品综合一区二区三区| 日本特黄久久久高潮| 亚洲国产日韩一区二区| 亚洲卡通动漫在线| 国产精品久久久久久久蜜臀 | 丝袜诱惑亚洲看片| 亚洲宅男天堂在线观看无病毒| 中文字幕在线免费不卡| 欧美国产乱子伦| 国产日韩成人精品| 精品捆绑美女sm三区| 精品久久久三级丝袜|