diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/org/noreply/fancydress/type3/SingleLeg.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/noreply/fancydress/type3/SingleLeg.java b/src/org/noreply/fancydress/type3/SingleLeg.java index 9193cd6..fe138b7 100644 --- a/src/org/noreply/fancydress/type3/SingleLeg.java +++ b/src/org/noreply/fancydress/type3/SingleLeg.java @@ -106,9 +106,9 @@ public abstract class SingleLeg { Routing routing) { if (sharedSecret.length != CryptoPrimitives.KEY_LEN) - throw new Error("sharedSecret must be KEY_LEN bytes long."); + throw new IllegalArgumentException("sharedSecret must be KEY_LEN bytes long."); if (digest.length != CryptoPrimitives.HASH_LEN) - throw new Error("digest must be HASH_LEN bytes long."); + throw new IllegalArgumentException("digest must be HASH_LEN bytes long."); byte[] fixedPart = new byte[MIN_SH]; byte[] dynamicPart = routing.getRoutingInformation(); int routingSize = dynamicPart.length; |