public static byte[] removeMAC(byte[] key,byte[] data){
  long hash=SipHashInline.hash24_palindromic(key,data,0,data.length - 8);
  long mac=Longs.fromByteArray(Arrays.copyOfRange(data,data.length - 8,data.length));
  if (mac == hash) {
    return Arrays.copyOf(data,data.length - 8);
  }
 else {
    return null;
  }
}

public static byte [ ] removeMAC ( byte [ ] key , byte [ ] data ) { long hash = SipHashInline . hash24_palindromic ( key , data , 0 , data . length - 8 ) ; long mac = Longs . fromByteArray ( Arrays . copyOfRange ( data , data . length - 8 , data . length ) ) ; if ( mac == hash ) { return Arrays . copyOf ( data , data . length - 8 ) ; } else { return null ; } }
check the mac and return the verified content or null if the verification failed
