Package gnu.javax.crypto.assembly

Examples of gnu.javax.crypto.assembly.Assembly


    testcase.attributes.put(modeNdx, testcase.modeAttributes);

    IPad pkcs7 = PadFactory.getInstance(Registry.PKCS7_PAD);

    testcase.asm = new Assembly();
    testcase.asm.addPreTransformer(Transformer.getCascadeTransformer(ofbBlowfish));
    testcase.asm.addPreTransformer(Transformer.getPaddingTransformer(pkcs7));

    testcase.testSymmetry(harness, 1);

    // add a compression transformer.
    // the resulting assembly encrypts + pad first and compresses later
    //      testcase.asm = new Assembly();
    //      testcase.asm.addPreTransformer(Transformer.getCascadeTransformer(ofbBlowfish));
    //      testcase.asm.addPreTransformer(Transformer.getPaddingTransformer(pkcs7));
    testcase.asm.addPostTransformer(Transformer.getDeflateTransformer());

    testcase.testSymmetry(harness, 2);

    // now build an assembly that compresses first and encrypts + pads later
    testcase.asm = new Assembly();
    testcase.asm.addPreTransformer(Transformer.getCascadeTransformer(ofbBlowfish));
    testcase.asm.addPreTransformer(Transformer.getPaddingTransformer(pkcs7));
    testcase.asm.addPreTransformer(Transformer.getDeflateTransformer());

    testcase.testSymmetry(harness, 3);
View Full Code Here

TOP

Related Classes of gnu.javax.crypto.assembly.Assembly

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.