public class InnerMessageBlock extends AbstractBlock implements Serializable
represents the inner encrypted part of a VortexMessage.
This part is specified as InnerMessageBlock in the file asn.1/messageBlocks.asn1
Modifier and Type | Field and Description |
---|---|
static int |
IDENTITY_ENCRYPTED |
static int |
IDENTITY_PLAIN |
static int |
PREFIX_ENCRYPTED |
static int |
PREFIX_PLAIN |
static int |
ROUTING_ENCRYPTED |
static int |
ROUTING_PLAIN |
static long |
serialVersionUID |
CRLF
Constructor and Description |
---|
InnerMessageBlock() |
InnerMessageBlock(Algorithm sym,
AsymmetricKey asym) |
InnerMessageBlock(byte[] b,
AsymmetricKey decryptionKey) |
InnerMessageBlock(PrefixBlock prefix,
IdentityBlock i,
RoutingCombo routing)
Creates an inner message with the specified components.
|
Modifier and Type | Method and Description |
---|---|
String |
dumpValueNotation(String prefix,
DumpType dt) |
boolean |
equals(Object o) |
IdentityBlock |
getIdentity() |
PayloadChunk[] |
getPayload() |
PrefixBlock |
getPrefix() |
RoutingCombo |
getRouting() |
int |
hashCode() |
protected void |
parse(org.bouncycastle.asn1.ASN1Encodable o) |
protected void |
parse(org.bouncycastle.asn1.ASN1Encodable o,
AsymmetricKey decryptionKey) |
protected void |
parse(byte[] p,
AsymmetricKey decryptionKey) |
byte[] |
setPayload(int chunkNumber,
byte[] payload)
Sets the payload block.
|
RoutingCombo |
setRouting(RoutingCombo newRouting)
Sets the routing block.
|
org.bouncycastle.asn1.ASN1Object |
toAsn1Object() |
org.bouncycastle.asn1.ASN1Object |
toAsn1Object(DumpType dumpType)
Dumps an ASN.1 representation of the object.
|
fromBase64, fromHex, parse, prepareDump, toBase64, toBitString, toBytes, toDer, toHex
public static final long serialVersionUID
public static final int PREFIX_PLAIN
public static final int PREFIX_ENCRYPTED
public static final int IDENTITY_PLAIN
public static final int IDENTITY_ENCRYPTED
public static final int ROUTING_PLAIN
public static final int ROUTING_ENCRYPTED
public InnerMessageBlock() throws IOException
IOException
public InnerMessageBlock(Algorithm sym, AsymmetricKey asym) throws IOException
IOException
public InnerMessageBlock(PrefixBlock prefix, IdentityBlock i, RoutingCombo routing)
Creates an inner message with the specified components.
prefix
- the prefix block to be usedi
- the header/identity block to be usedrouting
- the router block to be usedpublic InnerMessageBlock(byte[] b, AsymmetricKey decryptionKey) throws IOException
IOException
protected final void parse(byte[] p, AsymmetricKey decryptionKey) throws IOException
IOException
protected void parse(org.bouncycastle.asn1.ASN1Encodable o) throws IOException
parse
in class AbstractBlock
IOException
protected final void parse(org.bouncycastle.asn1.ASN1Encodable o, AsymmetricKey decryptionKey) throws IOException
IOException
public org.bouncycastle.asn1.ASN1Object toAsn1Object() throws IOException
IOException
public org.bouncycastle.asn1.ASN1Object toAsn1Object(DumpType dumpType) throws IOException
Dumpable
Dumps an ASN.1 representation of the object.
toAsn1Object
in interface Dumpable
dumpType
- the dump type to be usedIOException
- if dumping of the object fails due to an illegal internal state of the
objectpublic IdentityBlock getIdentity()
public RoutingCombo getRouting()
public PayloadChunk[] getPayload()
public PrefixBlock getPrefix()
public String dumpValueNotation(String prefix, DumpType dt) throws IOException
dumpValueNotation
in interface Block
IOException
public RoutingCombo setRouting(RoutingCombo newRouting)
Sets the routing block.
newRouting
- the routing block to be setpublic byte[] setPayload(int chunkNumber, byte[] payload)
Sets the payload block.
chunkNumber
- the workspace numberpayload
- the payload contentCopyright © 2023. All rights reserved.