code: public final static void getXteaSignature(byte[] array, int offset, int keyid) {
          int num_rounds = 32;
          int v0, v1, sum = 0, delta = 0x9E3779B9;
          int[] k = XTEA_KEYS[keyid];
          v0 = ByteBuffer.wrap(array, offset, 4).getInt();
          v1 = ByteBuffer.wrap(array, offset + 4, 4).getInt();
          for (int i = 0; i < num_rounds; i++) {
              v0 += (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (sum + k[sum & 3]);
              sum += delta;
              v1 += (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (sum + k[(sum >> 11) & 3]);
          }
          ByteBuffer tmp = ByteBuffer.allocate(4);
          tmp.putInt(v0);
          tmp.flip();
          System.arraycopy(tmp.array(), 0, array, offset, 4);
          tmp.clear();
          tmp.putInt(v1);
          tmp.flip();
          System.arraycopy(tmp.array(), 0, array, offset + 4, 4);
      }
docs: RTMPE type 8 uses XTEA on the regular signature http://en.wikipedia.org/wiki/XTEA
  
  @param array array to get signature
  @param offset offset to start from
  @param keyid ID of XTEA key