From c9e090818272174cf38de4d498d4e1bd6c7f4dd5 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 27 Oct 2003 21:53:02 +0000 Subject: Further work on SURBs. Decoding and further tests still required. --- .../fancydress/type3/routing/RoutingDestination.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/org/noreply/fancydress/type3/routing/RoutingDestination.java') 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 @@ -15,6 +15,11 @@ 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. * @@ -22,6 +27,18 @@ public abstract class RoutingDestination extends Routing { */ 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; } } -- cgit v1.2.3