private int parseHeaderTag(final byte[] b,final int off) throws ParseException {
  final int len=b.length - off;
  final CryptoAlgorithm cryptoAlgo=CryptoAlgorithm.deserialize(cryptoAlgoVal_);
  final int tagLen=cryptoAlgo.getTagLen();
  if (len >= tagLen) {
    headerTag_=Arrays.copyOfRange(b,off,off + tagLen);
    return tagLen;
  }
 else {
    throw new ParseException("Not enough bytes to parse header tag");
  }
}

private int parseHeaderTag ( final byte [ ] b , final int off ) throws ParseException { final int len = b . length - off ; final CryptoAlgorithm cryptoAlgo = CryptoAlgorithm . deserialize ( cryptoAlgoVal_ ) ; final int tagLen = cryptoAlgo . getTagLen ( ) ; if ( len >= tagLen ) { headerTag_ = Arrays . copyOfRange ( b , off , off + tagLen ) ; return tagLen ; } else { throw new ParseException ( "Not enough bytes to parse header tag" ) ; } }
parse the header tag in the provided bytes . it uses the crypto algorithm identifier to determine the length of the tag to parse . it looks for bytes of size defined by the tag length in the provided bytes starting at the specified off . < p > if successful , it returns the size of the parsed bytes which is the tag length determined from the crypto algorithm identifier . on failure , it throws a parse exception .
