diff options
Diffstat (limited to 'src/org/noreply/fancydress/type3/routing/RoutingDestination.java')
-rw-r--r-- | src/org/noreply/fancydress/type3/routing/RoutingDestination.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/org/noreply/fancydress/type3/routing/RoutingDestination.java b/src/org/noreply/fancydress/type3/routing/RoutingDestination.java index 38a0342..500ebc5 100644 --- a/src/org/noreply/fancydress/type3/routing/RoutingDestination.java +++ b/src/org/noreply/fancydress/type3/routing/RoutingDestination.java @@ -16,12 +16,29 @@ public abstract class RoutingDestination extends Routing { public static final int DECODINGHANDLE_LEN = 20; /** + * A decoding handle as is used in SURBS or forward encrypted messages. + */ + protected byte[] decodingHandle; + + /** * Default constructor. * * @param type The routing type as integer. */ protected RoutingDestination(int type) { super (type); + decodingHandle = null; + } + + /** + * Set a decoding handle as is used in SURBS or forward encrypted messages. + * + * @param decodingHandle decoding handle + */ + public void setDecodingHandle(byte[] decodingHandle) { + if (decodingHandle.length != DECODINGHANDLE_LEN) + throw new Error("Decoding handle is not DECODINGHANDLE_LEN bytes long."); + this.decodingHandle = decodingHandle; } } |