// Path: src/main/java/jcifs/dcerpc/rpc.java
// public static class sid_t extends NdrObject {
// 
//     public byte revision;
//     public byte sub_authority_count;
//     public byte[] identifier_authority;
//     public int[] sub_authority;
// 
// 
//     @Override
//     public void encode ( NdrBuffer _dst ) throws NdrException {
//         _dst.align(4);
//         int _sub_authoritys = this.sub_authority_count;
//         _dst.enc_ndr_long(_sub_authoritys);
//         _dst.enc_ndr_small(this.revision);
//         _dst.enc_ndr_small(this.sub_authority_count);
//         int _identifier_authoritys = 6;
//         int _identifier_authorityi = _dst.index;
//         _dst.advance(1 * _identifier_authoritys);
//         int _sub_authorityi = _dst.index;
//         _dst.advance(4 * _sub_authoritys);
// 
//         _dst = _dst.derive(_identifier_authorityi);
//         for ( int _i = 0; _i < _identifier_authoritys; _i++ ) {
//             _dst.enc_ndr_small(this.identifier_authority[ _i ]);
//         }
//         _dst = _dst.derive(_sub_authorityi);
//         for ( int _i = 0; _i < _sub_authoritys; _i++ ) {
//             _dst.enc_ndr_long(this.sub_authority[ _i ]);
//         }
//     }
// 
// 
//     @Override
//     public void decode ( NdrBuffer _src ) throws NdrException {
//         _src.align(4);
//         int _sub_authoritys = _src.dec_ndr_long();
//         this.revision = (byte) _src.dec_ndr_small();
//         this.sub_authority_count = (byte) _src.dec_ndr_small();
//         int _identifier_authoritys = 6;
//         int _identifier_authorityi = _src.index;
//         _src.advance(1 * _identifier_authoritys);
//         int _sub_authorityi = _src.index;
//         _src.advance(4 * _sub_authoritys);
// 
//         if ( this.identifier_authority == null ) {
//             if ( _identifier_authoritys < 0 || _identifier_authoritys > 0xFFFF )
//                 throw new NdrException(NdrException.INVALID_CONFORMANCE);
//             this.identifier_authority = new byte[_identifier_authoritys];
//         }
//         _src = _src.derive(_identifier_authorityi);
//         for ( int _i = 0; _i < _identifier_authoritys; _i++ ) {
//             this.identifier_authority[ _i ] = (byte) _src.dec_ndr_small();
//         }
//         if ( this.sub_authority == null ) {
//             if ( _sub_authoritys < 0 || _sub_authoritys > 0xFFFF )
//                 throw new NdrException(NdrException.INVALID_CONFORMANCE);
//             this.sub_authority = new int[_sub_authoritys];
//         }
//         _src = _src.derive(_sub_authorityi);
//         for ( int _i = 0; _i < _sub_authoritys; _i++ ) {
//             this.sub_authority[ _i ] = _src.dec_ndr_long();
//         }
//     }
// }


import jcifs.dcerpc.rpc.sid_t;
import jcifs.smb.SID;
/*
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package jcifs.dcerpc.msrpc;




class LsarSidArrayX extends lsarpc.LsarSidArray {

    LsarSidArrayX ( jcifs.SID[] sids ) {
        this.num_sids = sids.length;
        this.sids = new lsarpc.LsarSidPtr[sids.length];
        for ( int si = 0; si < sids.length; si++ ) {
            this.sids[ si ] = new lsarpc.LsarSidPtr();
// Path: src/main/java/jcifs/dcerpc/rpc.java
// public static class sid_t extends NdrObject {
// 
//     public byte revision;
//     public byte sub_authority_count;
//     public byte[] identifier_authority;
//     public int[] sub_authority;
// 
// 
//     @Override
//     public void encode ( NdrBuffer _dst ) throws NdrException {
//         _dst.align(4);
//         int _sub_authoritys = this.sub_authority_count;
//         _dst.enc_ndr_long(_sub_authoritys);
//         _dst.enc_ndr_small(this.revision);
//         _dst.enc_ndr_small(this.sub_authority_count);
//         int _identifier_authoritys = 6;
//         int _identifier_authorityi = _dst.index;
//         _dst.advance(1 * _identifier_authoritys);
//         int _sub_authorityi = _dst.index;
//         _dst.advance(4 * _sub_authoritys);
// 
//         _dst = _dst.derive(_identifier_authorityi);
//         for ( int _i = 0; _i < _identifier_authoritys; _i++ ) {
//             _dst.enc_ndr_small(this.identifier_authority[ _i ]);
//         }
//         _dst = _dst.derive(_sub_authorityi);
//         for ( int _i = 0; _i < _sub_authoritys; _i++ ) {
//             _dst.enc_ndr_long(this.sub_authority[ _i ]);
//         }
//     }
// 
// 
//     @Override
//     public void decode ( NdrBuffer _src ) throws NdrException {
//         _src.align(4);
//         int _sub_authoritys = _src.dec_ndr_long();
//         this.revision = (byte) _src.dec_ndr_small();
//         this.sub_authority_count = (byte) _src.dec_ndr_small();
//         int _identifier_authoritys = 6;
//         int _identifier_authorityi = _src.index;
//         _src.advance(1 * _identifier_authoritys);
//         int _sub_authorityi = _src.index;
//         _src.advance(4 * _sub_authoritys);
// 
//         if ( this.identifier_authority == null ) {
//             if ( _identifier_authoritys < 0 || _identifier_authoritys > 0xFFFF )
//                 throw new NdrException(NdrException.INVALID_CONFORMANCE);
//             this.identifier_authority = new byte[_identifier_authoritys];
//         }
//         _src = _src.derive(_identifier_authorityi);
//         for ( int _i = 0; _i < _identifier_authoritys; _i++ ) {
//             this.identifier_authority[ _i ] = (byte) _src.dec_ndr_small();
//         }
//         if ( this.sub_authority == null ) {
//             if ( _sub_authoritys < 0 || _sub_authoritys > 0xFFFF )
//                 throw new NdrException(NdrException.INVALID_CONFORMANCE);
//             this.sub_authority = new int[_sub_authoritys];
//         }
//         _src = _src.derive(_sub_authorityi);
//         for ( int _i = 0; _i < _sub_authoritys; _i++ ) {
//             this.sub_authority[ _i ] = _src.dec_ndr_long();
//         }
//     }
// }


// Path: src/main/java/jcifs/dcerpc/msrpc/LsarSidArrayX.java
import jcifs.dcerpc.rpc.sid_t;
import jcifs.smb.SID;

/*
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package jcifs.dcerpc.msrpc;




class LsarSidArrayX extends lsarpc.LsarSidArray {

    LsarSidArrayX ( jcifs.SID[] sids ) {
        this.num_sids = sids.length;
        this.sids = new lsarpc.LsarSidPtr[sids.length];
        for ( int si = 0; si < sids.length; si++ ) {
            this.sids[ si ] = new lsarpc.LsarSidPtr();
            this.sids[ si ].sid = sids[ si ].unwrap(sid_t.class);