|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netxms.base.EncryptionContext
public final class EncryptionContext
Encryption context for NXCP communication session
Constructor Summary | |
---|---|
protected |
EncryptionContext(int cipher)
Internal constructor |
Method Summary | |
---|---|
static EncryptionContext |
createInstance(NXCPMessage request)
Create encryption context based on information from session key request message. |
byte[] |
decryptMessage(NXCPDataInputStream inputStream,
int length)
|
byte[] |
encryptMessage(NXCPMessage msg)
Encrypt NXCP message. |
int |
getCipher()
Get cipher |
byte[] |
getEncryptedIv(NXCPMessage msg)
Encrypt initialization vector with public key from encryption setup message. |
byte[] |
getEncryptedSessionKey(NXCPMessage msg)
Encrypt session key with public key from encryption setup message. |
int |
getIvLength()
|
int |
getKeyLength()
Get key length (in bytes) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected EncryptionContext(int cipher) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
Method Detail |
---|
public static EncryptionContext createInstance(NXCPMessage request) throws NXCPException
request
- session key request message
NXCPException
- if encryption context cannot be createdpublic byte[] getEncryptedSessionKey(NXCPMessage msg) throws java.security.GeneralSecurityException
msg
- encryption setup message
java.security.GeneralSecurityException
public byte[] getEncryptedIv(NXCPMessage msg) throws java.security.GeneralSecurityException
msg
- encryption setup message
java.security.GeneralSecurityException
public byte[] encryptMessage(NXCPMessage msg) throws java.io.IOException, java.security.GeneralSecurityException
msg
- message to encrypt
java.io.IOException
java.security.GeneralSecurityException
java.security.InvalidKeyException
public byte[] decryptMessage(NXCPDataInputStream inputStream, int length) throws java.security.GeneralSecurityException, java.io.IOException
inputStream
- length
-
java.security.GeneralSecurityException
java.io.IOException
public int getCipher()
public int getKeyLength()
public int getIvLength()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |