IPWorks Encrypt 2020 Android Edition

Questions / Feedback?

ComputeMACBlock Method

Computes the MAC value of specified data.


public byte[] computeMACBlock(byte[] inputBuffer, boolean lastBlock);


ComputeMACBlock allows input to the component to be specified in blocks. This method will return the MAC value only when the parameter LastBlock is True.

InputBuffer specifies the input data.

LastBlock specifies whether the block is the last block. If this is False the method will return an empty byte array.

To calculate the MAC value of data that is broken apart into multiple blocks make multiple calls to this method. For instance:

//Encode output in hex
poly1305.EncodeMAC = true; //hex output

//Pass any number of parts, of any size

//Pass true for the last block

//The MACValue property holds the MAC value

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Encrypt 2020 Android Edition - Version 20.0 [Build 8161]