@Override
    public int encode ( byte[] dst, int dstIndex ) {
        int start = dstIndex;

        SMBUtil.writeInt2(this.hashAlgos != null ? this.hashAlgos.length : 0, dst, dstIndex);
        SMBUtil.writeInt2(this.salt != null ? this.salt.length : 0, dst, dstIndex + 2);
        dstIndex += 4;

        if ( this.hashAlgos != null ) {
            for ( int hashAlgo : this.hashAlgos ) {
                SMBUtil.writeInt2(hashAlgo, dst, dstIndex);
                dstIndex += 2;
            }
        }

        if ( this.salt != null ) {
            System.arraycopy(this.salt, 0, dst, dstIndex, this.salt.length);
            dstIndex += this.salt.length;
        }

        return dstIndex - start;
    }
@ Override public int encode ( byte [ ] dst , int dstIndex ) { int start = dstIndex ; SMBUtil . writeInt2 ( this . hashAlgos != null ? this . hashAlgos . length : 0 , dst , dstIndex ) ; SMBUtil . writeInt2 ( this . salt != null ? this . salt . length : 0 , dst , dstIndex + 2 ) ; dstIndex += 4 ; if ( this . hashAlgos != null ) { for ( int hashAlgo : this . hashAlgos ) { SMBUtil . writeInt2 ( hashAlgo , dst , dstIndex ) ; dstIndex += 2 ; } } if ( this . salt != null ) { System . arraycopy ( this . salt , 0 , dst , dstIndex , this . salt . length ) ; dstIndex += this . salt . length ; } return dstIndex - start ; }
{@inheritDoc}

@see jcifs.Encodable#encode(byte[], int)