/* $Id$ */ package org.noreply.fancydress.type3; import org.noreply.fancydress.type3.routing.*; import org.noreply.fancydress.status.*; import org.noreply.fancydress.crypto.*; public class ForwardLeg extends SingleLeg { private byte[][] sharedKeys; public ForwardLeg (HalfPath path, Routing finalRouting) throws Mix3BadArgumentsChainTooLongException { super(); Hop[] hops = path.getHops(); initSharedKeys(hops.length); makeLeg(hops, sharedKeys, finalRouting); }; private void initSharedKeys(int n) { sharedKeys = new byte[n][]; for (int i=0; i < n; i++) sharedKeys[i] = CryptoPrimitives.rand(CryptoPrimitives.KEY_LEN); } public byte[][] getSharedKeys() { return sharedKeys; } }