Package org.jgroups.protocols
Class DH_KEY_EXCHANGE.DhHeader
- java.lang.Object
-
- org.jgroups.Header
-
- org.jgroups.protocols.DH_KEY_EXCHANGE.DhHeader
-
- All Implemented Interfaces:
Constructable<Header>
,SizeStreamable
,Streamable
- Enclosing class:
- DH_KEY_EXCHANGE
public static class DH_KEY_EXCHANGE.DhHeader extends Header
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
dh_key
protected byte[]
encrypted_secret_key
protected byte[]
secret_key_version
protected DH_KEY_EXCHANGE.Type
type
-
Constructor Summary
Constructors Constructor Description DhHeader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.function.Supplier<? extends Header>
create()
Creates an instance of the class implementing this interfacestatic DH_KEY_EXCHANGE.DhHeader
createSecretKeyRequest(byte[] dh_key)
static DH_KEY_EXCHANGE.DhHeader
createSecretKeyResponse(byte[] dh_pub_key, byte[] encrypted_secret_key, byte[] version)
byte[]
dhKey()
byte[]
encryptedSecret()
short
getMagicId()
Returns the magic-ID.void
readFrom(java.io.DataInput in)
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closedint
serializedSize()
Returns the size (in bytes) of the marshalled objectjava.lang.String
toString()
byte[]
version()
void
writeTo(java.io.DataOutput out)
Write the entire state of the current object (including superclasses) to outstream.
-
-
-
Field Detail
-
type
protected DH_KEY_EXCHANGE.Type type
-
dh_key
protected byte[] dh_key
-
encrypted_secret_key
protected byte[] encrypted_secret_key
-
secret_key_version
protected byte[] secret_key_version
-
-
Method Detail
-
createSecretKeyRequest
public static DH_KEY_EXCHANGE.DhHeader createSecretKeyRequest(byte[] dh_key)
-
createSecretKeyResponse
public static DH_KEY_EXCHANGE.DhHeader createSecretKeyResponse(byte[] dh_pub_key, byte[] encrypted_secret_key, byte[] version)
-
create
public java.util.function.Supplier<? extends Header> create()
Description copied from interface:Constructable
Creates an instance of the class implementing this interface
-
getMagicId
public short getMagicId()
Description copied from class:Header
Returns the magic-ID. If defined in jg-magic-map.xml, the IDs need to be the same- Specified by:
getMagicId
in classHeader
-
dhKey
public byte[] dhKey()
-
encryptedSecret
public byte[] encryptedSecret()
-
version
public byte[] version()
-
serializedSize
public int serializedSize()
Description copied from interface:SizeStreamable
Returns the size (in bytes) of the marshalled object
-
writeTo
public void writeTo(java.io.DataOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed- Throws:
java.io.IOException
-
readFrom
public void readFrom(java.io.DataInput in) throws java.io.IOException
Description copied from interface:Streamable
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Throws:
java.io.IOException
-
-