Package net.messagevortex.asn1
Class InnerMessageBlock
java.lang.Object
net.messagevortex.asn1.AbstractBlock
net.messagevortex.asn1.InnerMessageBlock
- All Implemented Interfaces:
Serializable,Block,Dumpable
represents the inner encrypted part of a VortexMessage.
This part is specified as InnerMessageBlock in the file asn.1/messageBlocks.asn1
- 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
ConstructorsConstructorDescriptionInnerMessageBlock(byte[] b, AsymmetricKey decryptionKey) InnerMessageBlock(Algorithm sym, AsymmetricKey asym) InnerMessageBlock(PrefixBlock prefix, IdentityBlock i, RoutingCombo routing) Creates an inner message with the specified components. -
Method Summary
Modifier and TypeMethodDescriptiondumpValueNotation(String prefix, DumpType dt) booleaninthashCode()protected final voidparse(byte[] p, AsymmetricKey decryptionKey) protected voidparse(org.bouncycastle.asn1.ASN1Encodable o) protected final voidparse(org.bouncycastle.asn1.ASN1Encodable o, AsymmetricKey decryptionKey) byte[]setPayload(int chunkNumber, byte[] payload) Sets the payload block.setRouting(RoutingCombo newRouting) Sets the routing block.org.bouncycastle.asn1.ASN1Objectorg.bouncycastle.asn1.ASN1ObjecttoAsn1Object(DumpType dumpType) Dumps an ASN.1 representation of the object.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:
-
PREFIX_PLAIN
public static final int PREFIX_PLAIN- See Also:
-
PREFIX_ENCRYPTED
public static final int PREFIX_ENCRYPTED- See Also:
-
IDENTITY_PLAIN
public static final int IDENTITY_PLAIN- See Also:
-
IDENTITY_ENCRYPTED
public static final int IDENTITY_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
-
InnerMessageBlock
- Throws:
IOException
-
InnerMessageBlock
- Throws:
IOException
-
InnerMessageBlock
Creates an inner message with the specified components.
- Parameters:
prefix- the prefix block to be usedi- the header/identity block to be usedrouting- the router block to be used
-
InnerMessageBlock
- Throws:
IOException
-
-
Method Details
-
parse
- Throws:
IOException
-
parse
- Specified by:
parsein classAbstractBlock- Throws:
IOException
-
parse
protected final void parse(org.bouncycastle.asn1.ASN1Encodable o, AsymmetricKey decryptionKey) throws IOException - Throws:
IOException
-
toAsn1Object
- Throws:
IOException
-
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
-
getIdentity
-
getRouting
-
getPayload
-
getPrefix
-
dumpValueNotation
- Specified by:
dumpValueNotationin interfaceBlock- Throws:
IOException
-
setRouting
Sets the routing block.
- Parameters:
newRouting- the routing block to be set- Returns:
- the previously set routing block
-
setPayload
public byte[] setPayload(int chunkNumber, byte[] payload) Sets the payload block.
- Parameters:
chunkNumber- the workspace numberpayload- the payload content- Returns:
- the previously set payload
-
equals
-
hashCode
public int hashCode()
-