Fix format of msgType in exception message. (#201)

This commit is contained in:
Jonathan Lennox 2020-04-17 16:11:28 -04:00 committed by GitHub
parent e90c796d6d
commit e6e36856c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -308,7 +308,7 @@ public class MessageIntegrityAttribute
logger.warning("Can not encode a message of type Indication."); logger.warning("Can not encode a message of type Indication.");
} }
Objects.requireNonNull(key, "key=null; msgType=" + msgType); Objects.requireNonNull(key, "key=null; msgType=" + String.format("%04X", (int)msgType));
//now calculate the HMAC-SHA1 //now calculate the HMAC-SHA1
this.hmacSha1Content = calculateHmacSha1(content, offset, length, key); this.hmacSha1Content = calculateHmacSha1(content, offset, length, key);