Package org.apache.directory.shared.kerberos.components

Examples of org.apache.directory.shared.kerberos.components.Checksum.computeLength()


        Checksum checksum = chkContainer.getChecksum();

        assertEquals( ChecksumType.getTypeByValue( 2 ), checksum.getChecksumType() );
        assertTrue( Arrays.equals( Strings.getBytesUtf8( "chksum" ), checksum.getChecksumValue() ) );

        ByteBuffer bb = ByteBuffer.allocate( checksum.computeLength() );

        try
        {
            bb = checksum.encode( bb );
View Full Code Here


    public void testEncodingChecksum() throws Exception
    {
        Checksum chk = new Checksum( ChecksumType.CRC32, new byte[]
            { 0x01, 0x02, 0x03 } );

        ByteBuffer encoded = ByteBuffer.allocate( chk.computeLength() );

        chk.encode( encoded );

        byte[] expectedResult = new byte[]
            {
View Full Code Here

    @Test
    public void testEncodingNullChecksum() throws Exception
    {
        Checksum chk = new Checksum( ChecksumType.CRC32, null );

        ByteBuffer encoded = ByteBuffer.allocate( chk.computeLength() );

        chk.encode( encoded );

        byte[] expectedResult = new byte[]
            {
View Full Code Here

        Checksum checksum = chkContainer.getChecksum();

        assertEquals( ChecksumType.getTypeByValue( 2 ), checksum.getChecksumType() );
        assertTrue( Arrays.equals( Strings.getBytesUtf8( "chksum" ), checksum.getChecksumValue() ) );

        ByteBuffer bb = ByteBuffer.allocate( checksum.computeLength() );

        try
        {
            bb = checksum.encode( bb );
View Full Code Here

        Checksum checksum = chkContainer.getChecksum();
       
        assertEquals( ChecksumType.getTypeByValue( 2 ), checksum.getChecksumType() );
        assertTrue( Arrays.equals( Strings.getBytesUtf8("chksum"), checksum.getChecksumValue() ) );
       
        ByteBuffer bb = ByteBuffer.allocate( checksum.computeLength() );
       
        try
        {
            bb = checksum.encode( bb );
   
View Full Code Here

    public void testEncodingChecksum() throws Exception
    {
        Checksum chk = new Checksum( ChecksumType.CRC32, new byte[]
            { 0x01, 0x02, 0x03 } );

        ByteBuffer encoded = ByteBuffer.allocate( chk.computeLength() );

        chk.encode( encoded );

        byte[] expectedResult = new byte[]
            {
View Full Code Here

    @Test
    public void testEncodingNullChecksum() throws Exception
    {
        Checksum chk = new Checksum( ChecksumType.CRC32, null );

        ByteBuffer encoded = ByteBuffer.allocate( chk.computeLength() );

        chk.encode( encoded );

        byte[] expectedResult = new byte[]
            {
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.