java.lang.Object
org.snmp4j.security.PrivacyGeneric
- All Implemented Interfaces:
Serializable,PrivacyProtocol,SecurityProtocol
The PrivacyGeneric abstract class implements common functionality of privacy protocols.
- Since:
- 2.5.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CipherPoolprotected intprotected intprivate static final LogAdapterprotected Stringprotected Stringprotected Saltprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]doDecrypt(byte[] cryptedData, int offset, int length, byte[] decryptionKey, byte[] iv) protected byte[]protected byte[]doFinalWithPadding(byte[] unencryptedData, int offset, int length, Cipher alg) protected CipherdoInit(byte[] encryptionKey, byte[] initVect) booleanChecks whether this security protocol is actually supported by this Java runtime environment.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.snmp4j.security.PrivacyProtocol
decrypt, encrypt, extendShortKey, getDecryptParamsLength, getEncryptedLength, getID, getMaxKeyLength, getMinKeyLength
-
Field Details
-
logger
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
protocolId
-
protocolClass
-
keyBytes
protected int keyBytes -
salt
-
cipherPool
-
initVectorLength
protected int initVectorLength
-
-
Constructor Details
-
PrivacyGeneric
public PrivacyGeneric()
-
-
Method Details
-
doInit
protected Cipher doInit(byte[] encryptionKey, byte[] initVect) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException, InvalidAlgorithmParameterException -
doFinal
protected byte[] doFinal(byte[] unencryptedData, int offset, int length, Cipher alg) throws BadPaddingException, IllegalBlockSizeException, ShortBufferException -
doFinalWithPadding
protected byte[] doFinalWithPadding(byte[] unencryptedData, int offset, int length, Cipher alg) throws IllegalBlockSizeException, BadPaddingException, ShortBufferException -
doDecrypt
protected byte[] doDecrypt(byte[] cryptedData, int offset, int length, byte[] decryptionKey, byte[] iv) -
isSupported
public boolean isSupported()Description copied from interface:SecurityProtocolChecks whether this security protocol is actually supported by this Java runtime environment.- Specified by:
isSupportedin interfaceSecurityProtocol- Returns:
trueif this security protocol is supported,falseotherwise.
-