private static byte[] createBlob(byte[] targetInformation,byte[] clientNonce,long time){
  byte[] blobSignature=new byte[]{(byte)0x01,(byte)0x01,(byte)0x00,(byte)0x00};
  byte[] reserved=new byte[]{(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00};
  byte[] unknown1=new byte[]{(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00};
  byte[] unknown2=new byte[]{(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00};
  time+=11644473600000l;
  time*=10000;
  byte[] timestamp=new byte[8];
  for (int i=0; i < 8; i++) {
    timestamp[i]=(byte)time;
    time>>>=8;
  }
  byte[] blob=new byte[blobSignature.length + reserved.length + timestamp.length+ clientNonce.length+ unknown1.length+ targetInformation.length+ unknown2.length];
  int offset=0;
  System.arraycopy(blobSignature,0,blob,offset,blobSignature.length);
  offset+=blobSignature.length;
  System.arraycopy(reserved,0,blob,offset,reserved.length);
  offset+=reserved.length;
  System.arraycopy(timestamp,0,blob,offset,timestamp.length);
  offset+=timestamp.length;
  System.arraycopy(clientNonce,0,blob,offset,clientNonce.length);
  offset+=clientNonce.length;
  System.arraycopy(unknown1,0,blob,offset,unknown1.length);
  offset+=unknown1.length;
  System.arraycopy(targetInformation,0,blob,offset,targetInformation.length);
  offset+=targetInformation.length;
  System.arraycopy(unknown2,0,blob,offset,unknown2.length);
  return blob;
}

private static byte [ ] createBlob ( byte [ ] targetInformation , byte [ ] clientNonce , long time ) { byte [ ] blobSignature = new byte [ ] { ( byte ) 0x01 , ( byte ) 0x01 , ( byte ) 0x00 , ( byte ) 0x00 } ; byte [ ] reserved = new byte [ ] { ( byte ) 0x00 , ( byte ) 0x00 , ( byte ) 0x00 , ( byte ) 0x00 } ; byte [ ] unknown1 = new byte [ ] { ( byte ) 0x00 , ( byte ) 0x00 , ( byte ) 0x00 , ( byte ) 0x00 } ; byte [ ] unknown2 = new byte [ ] { ( byte ) 0x00 , ( byte ) 0x00 , ( byte ) 0x00 , ( byte ) 0x00 } ; time += 11644473600000l ; time *= 10000 ; byte [ ] timestamp = new byte [ 8 ] ; for ( int i = 0 ; i < 8 ; i ++ ) { timestamp [ i ] = ( byte ) time ; time >>>= 8 ; } byte [ ] blob = new byte [ blobSignature . length + reserved . length + timestamp . length + clientNonce . length + unknown1 . length + targetInformation . length + unknown2 . length ] ; int offset = 0 ; System . arraycopy ( blobSignature , 0 , blob , offset , blobSignature . length ) ; offset += blobSignature . length ; System . arraycopy ( reserved , 0 , blob , offset , reserved . length ) ; offset += reserved . length ; System . arraycopy ( timestamp , 0 , blob , offset , timestamp . length ) ; offset += timestamp . length ; System . arraycopy ( clientNonce , 0 , blob , offset , clientNonce . length ) ; offset += clientNonce . length ; System . arraycopy ( unknown1 , 0 , blob , offset , unknown1 . length ) ; offset += unknown1 . length ; System . arraycopy ( targetInformation , 0 , blob , offset , targetInformation . length ) ; offset += targetInformation . length ; System . arraycopy ( unknown2 , 0 , blob , offset , unknown2 . length ) ; return blob ; }
creates the ntlmv2 blob from the given target information block and client nonce .
