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

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


        assertTrue( principalName.getNames().contains( "hnelson1" ) );
        assertTrue( principalName.getNames().contains( "hnelson2" ) );
        assertTrue( principalName.getNames().contains( "hnelson3" ) );

        // Check the encoding
        ByteBuffer bb = ByteBuffer.allocate( principalName.computeLength() );

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


    @Test
    public void testEncodingPrincipalNameOneName() throws Exception
    {
        PrincipalName principal = new PrincipalName( "Test", PrincipalNameType.KRB_NT_PRINCIPAL );

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

        principal.encode( encoded );

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

    {
        PrincipalName principal = new PrincipalName( "Test1", PrincipalNameType.KRB_NT_PRINCIPAL );
        principal.addName( "Test2" );
        principal.addName( "Test3" );

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

        principal.encode( encoded );

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

    @Test
    public void testEncodingPrincipalNameNullName() throws Exception
    {
        PrincipalName principal = new PrincipalName( null, PrincipalNameType.KRB_NT_PRINCIPAL );

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

        principal.encode( encoded );

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

    @Test
    public void testEncodingPrincipalNameOneName() throws Exception
    {
        PrincipalName principal = new PrincipalName( "Test", PrincipalNameType.KRB_NT_PRINCIPAL );

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

        principal.encode( encoded );

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

    {
        PrincipalName principal = new PrincipalName( "Test1", PrincipalNameType.KRB_NT_PRINCIPAL );
        principal.addName( "Test2" );
        principal.addName( "Test3" );

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

        principal.encode( encoded );

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

    @Test
    public void testEncodingPrincipalNameNullName() throws Exception
    {
        PrincipalName principal = new PrincipalName( null, PrincipalNameType.KRB_NT_PRINCIPAL );

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

        principal.encode( encoded );

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

        assertTrue( principalName.getNames().contains( "hnelson1" ) );
        assertTrue( principalName.getNames().contains( "hnelson2" ) );
        assertTrue( principalName.getNames().contains( "hnelson3" ) );

        // Check the encoding
        ByteBuffer bb = ByteBuffer.allocate( principalName.computeLength() );

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

        assertTrue( principalName.getNames().contains( "hnelson1" ) );
        assertTrue( principalName.getNames().contains( "hnelson2" ) );
        assertTrue( principalName.getNames().contains( "hnelson3" ) );

        // Check the encoding
        ByteBuffer bb = ByteBuffer.allocate( principalName.computeLength() );
       
        try
        {
            bb = principalName.encode( bb );
   
View Full Code Here

    @Test
    public void testEncodingPrincipalNameOneName() throws Exception
    {
        PrincipalName principal = new PrincipalName( "Test", PrincipalNameType.KRB_NT_PRINCIPAL );

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

        principal.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.