From the code of the UMac32 class:
for (int i = 0; i < OUTPUT_LEN; i++)
{
result[i] = (byte) (result[i] ^ pad[i]);
}
Where OUTPUT_LEN
is defined as a constant with value 8. The UMAC-OUTPUT-LEN
defined in the JavaDoc is not a configurable parameter of the implementation but one for the UMAC algorithm (as Perseids has clarified).
So the only thing you can do is to truncate the result manually. This is something that is actually cryptographically sound; hashes and MAC authentication tags are often truncated, leaving just the least significant (leftmost) bytes. However, a tag of 8 bytes is approximately the minimum already; anything less will lessen the cryptographic strength of the function.