public int addPadding(byte[] in,int inOff){
  byte code=(byte)(in.length - inOff);
  while (inOff < (in.length - 1)) {
    in[inOff]=(byte)random.nextInt();
    inOff++;
  }
  in[inOff]=code;
  return code;
}

public int addPadding ( byte [ ] in , int inOff ) { byte code = ( byte ) ( in . length - inOff ) ; while ( inOff < ( in . length - 1 ) ) { in [ inOff ] = ( byte ) random . nextInt ( ) ; inOff ++ ; } in [ inOff ] = code ; return code ; }
add the pad bytes to the passed in block , returning the number of bytes added .
