|
|
@ -61,7 +61,7 @@ public class MessageMac {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static byte[] getMessageWithoutMac(byte[] message) throws InvalidMacException {
|
|
|
|
public static byte[] getMessageWithoutMac(byte[] message) throws InvalidMacException {
|
|
|
|
if (message.length <= MAC_LENGTH)
|
|
|
|
if (message == null || message.length <= MAC_LENGTH)
|
|
|
|
throw new InvalidMacException("Message shorter than MAC!");
|
|
|
|
throw new InvalidMacException("Message shorter than MAC!");
|
|
|
|
|
|
|
|
|
|
|
|
byte[] strippedMessage = new byte[message.length - MAC_LENGTH];
|
|
|
|
byte[] strippedMessage = new byte[message.length - MAC_LENGTH];
|
|
|
|