java.io.Serializable
, NonStandardSecurityProtocol
, PrivacyProtocol
, SecurityProtocol
PrivAES192With3DESKeyExtension
, PrivAES256With3DESKeyExtension
public abstract class PrivAESWith3DESKeyExtension extends PrivAES implements NonStandardSecurityProtocol
Priv3DES
but was never specified for AES 192 and 256 bit.
Note: DO NOT USE THIS CLASS IF YOU WANT TO COMPLY WITH draft-blumenthal-aes-usm-04.txt!Modifier and Type | Field | Description |
---|---|---|
protected OID |
oid |
cipherPool, initVectorLength, keyBytes, protocolClass, protocolId
Constructor | Description |
---|---|
PrivAESWith3DESKeyExtension(int keyBytes) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
byte[] |
extendShortKey(byte[] shortKey,
OctetString password,
byte[] engineID,
AuthenticationProtocol authProtocol) |
Extend a localized key that is too short.
|
OID |
getID() |
Gets the OID uniquely identifying the privacy protocol.
|
void |
setID(OID newOID) |
Assign a new ID to a non-standard security protocol instance.
|
getDefaultID
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doDecrypt, doFinal, doFinalWithPadding, doInit, isSupported
asHex, decrypt, encrypt, getDecryptParamsLength, getEncryptedLength, getMaxKeyLength, getMinKeyLength
isSupported
protected OID oid
public PrivAESWith3DESKeyExtension(int keyBytes)
keyBytes
- Length of key, must be 16, 24 or 32.java.lang.IllegalArgumentException
- if keyBytes is illegalpublic byte[] extendShortKey(byte[] shortKey, OctetString password, byte[] engineID, AuthenticationProtocol authProtocol)
PrivacyProtocol
extendShortKey
in interface PrivacyProtocol
extendShortKey
in class PrivAES
shortKey
- the short key that was generated using
AuthenticationProtocol.passwordToKey(org.snmp4j.smi.OctetString, byte[])
function.password
- the password to use for key extension.engineID
- the SNMP engine ID of the authoritative engine.authProtocol
- the authentication protocol that should be used.shortKey
if no extension is needed.public void setID(OID newOID)
NonStandardSecurityProtocol
setID
in interface NonStandardSecurityProtocol
newOID
- the new security protcol ID for the security protocol class called.public OID getID()
PrivacyProtocol
getID
in interface PrivacyProtocol
getID
in interface SecurityProtocol
OID
instance.Copyright © 2018 SNMP4J.org. All rights reserved.