final byte[] compute(byte type,byte buf[],int offset,int len,boolean isSimulated){
  if (macAlg.size == 0) {
    return nullMAC;
  }
  if (!isSimulated) {
    byte[] additional=acquireAuthenticationBytes(type,len);
    mac.update(additional);
  }
  mac.update(buf,offset,len);
  return mac.doFinal();
}

final byte [ ] compute ( byte type , byte buf [ ] , int offset , int len , boolean isSimulated ) { if ( macAlg . size == 0 ) { return nullMAC ; } if ( ! isSimulated ) { byte [ ] additional = acquireAuthenticationBytes ( type , len ) ; mac . update ( additional ) ; } mac . update ( buf , offset , len ) ; return mac . doFinal ( ) ; }
computes and returns the mac for the data in this byte array .
