Package net.messagevortex.asn1
Class RoutingCombo
java.lang.Object
net.messagevortex.asn1.AbstractBlock
net.messagevortex.asn1.RoutingCombo
- All Implemented Interfaces:
Serializable,Block,Dumpable
Created by martin.gwerder on 14.04.2016.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final longFields inherited from class net.messagevortex.asn1.AbstractBlock
CRLF -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty router block.RoutingCombo(byte[] b, boolean encrypted) Creates a router block from a DER representation.RoutingCombo(org.bouncycastle.asn1.ASN1Encodable to) -
Method Summary
Modifier and TypeMethodDescriptionbooleandumpValueNotation(String prefix, DumpType dumpType) booleanlonglonginthashCode()booleanprotected final voidparse(org.bouncycastle.asn1.ASN1Encodable to) longsetFistProcessTime(long minProcessTime) Sets time when router block could be processed (earliest).longsetLastProcessTime(long maxProcessTime) Sets time when router block could be processed (latest).org.bouncycastle.asn1.ASN1ObjecttoAsn1Object(DumpType dumpType) Dumps an ASN.1 representation of the object.byte[]Methods inherited from class net.messagevortex.asn1.AbstractBlock
fromBase64, fromHex, parse, prepareDump, toBase64, toBitString, toBytes, toDer, toHex
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
MURB
public static final int MURB- See Also:
-
OPERATIONS
public static final int OPERATIONS- See Also:
-
PREFIX_PLAIN
public static final int PREFIX_PLAIN- See Also:
-
PREFIX_ENCRYPTED
public static final int PREFIX_ENCRYPTED- See Also:
-
ROUTING_PLAIN
public static final int ROUTING_PLAIN- See Also:
-
ROUTING_ENCRYPTED
public static final int ROUTING_ENCRYPTED- See Also:
-
-
Constructor Details
-
RoutingCombo
public RoutingCombo()Creates an empty router block.
-
RoutingCombo
Creates a router block from a DER representation.
if a router block is assumed encryptedand without decryption key) it stores the block as binary blob without handling its inner workings
- Parameters:
b- the binary representation of the DER encoded and possibly encrypted blockencrypted- flagging whether this block is expected to be unparseable due to its encryption- Throws:
IOException- if failing to parse the block
-
RoutingCombo
- Throws:
IOException
-
-
Method Details
-
parse
- Specified by:
parsein classAbstractBlock- Throws:
IOException
-
isEncrypted
public boolean isEncrypted() -
getFirstProcessTime
public long getFirstProcessTime() -
setFistProcessTime
public long setFistProcessTime(long minProcessTime) Sets time when router block could be processed (earliest).
- Parameters:
minProcessTime- the time to be set- Returns:
- the previously set time
-
getLastProcessTime
public long getLastProcessTime() -
setLastProcessTime
public long setLastProcessTime(long maxProcessTime) Sets time when router block could be processed (latest).
- Parameters:
maxProcessTime- the time to be set- Returns:
- the previously set time
-
toAsn1Object
Description copied from interface:DumpableDumps an ASN.1 representation of the object.
- Specified by:
toAsn1Objectin interfaceDumpable- Parameters:
dumpType- the dump type to be used- Returns:
- the ASN.1 string representation of the object
- Throws:
IOException- if dumping of the object fails due to an illegal internal state of the object
-
addOperation
-
toEncBytes
public byte[] toEncBytes() -
dumpValueNotation
- Specified by:
dumpValueNotationin interfaceBlock
-
equals
-
hashCode
public int hashCode()
-