Examples of convPolyTrinaryToBinaryBlockHelper()


Examples of com.securityinnovation.jNeo.ntruencrypt.NtruEncryptKey.convPolyTrinaryToBinaryBlockHelper()

            1, -100, -1111,
            00100111};
        byte expectedBits[] = {(byte)0xa3, (byte)0xc0, (byte)0xcc};
        byte bits[] = new byte[3];

        keys.convPolyTrinaryToBinaryBlockHelper(0, trits, 0, bits);
        assertArrayEquals(bits, expectedBits);
    }

    // Test that the primitive that converts a block of trits to a block
    // of bits works with non-zero offsets for both the bit and trit arrays.
View Full Code Here

Examples of com.securityinnovation.jNeo.ntruencrypt.NtruEncryptKey.convPolyTrinaryToBinaryBlockHelper()

            00100111};
        byte expectedBits[] = {22, 22, 22, (byte)0xa3, (byte)0xc0, (byte)0xcc};
        byte bits[] = new byte[6];
        java.util.Arrays.fill(bits, (byte)22);

        keys.convPolyTrinaryToBinaryBlockHelper(16, trits, 3, bits);
        assertArrayEquals(bits, expectedBits);
    }

    // Test that the primitive that converts a block of trits to a block
    // of bits won't overrun the end of the output buffer.
View Full Code Here

Examples of com.securityinnovation.jNeo.ntruencrypt.NtruEncryptKey.convPolyTrinaryToBinaryBlockHelper()

            00100111};
        byte expectedBits[] = {22, 22, 22, (byte)0xa3, (byte)0xc0};
        byte bits[] = new byte[5];
        java.util.Arrays.fill(bits, (byte)22);

        keys.convPolyTrinaryToBinaryBlockHelper(16, trits, 3, bits);
        assertArrayEquals(bits, expectedBits);
    }

    // Test that the primitive that converts a block of trits to a block
    // of bits won't overrun the end of the input buffer. It should
View Full Code Here

Examples of com.securityinnovation.jNeo.ntruencrypt.NtruEncryptKey.convPolyTrinaryToBinaryBlockHelper()

            1, -100, -1}; // missing last 11 trits,
        byte expectedBits[] = {22, 22, 22, (byte)0xa3, (byte)0x00, (byte)0x00};
        byte bits[] = new byte[6];
        java.util.Arrays.fill(bits, (byte)22);

        keys.convPolyTrinaryToBinaryBlockHelper(24, trits, 3, bits);
        assertArrayEquals(bits, expectedBits);
    }


    // Test that the full conversion from trinary polynomial to binary
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.