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 and Description |
|---|---|
protected OID |
oid |
cipherPool, initVectorLength, keyBytes, protocolClass, protocolId| Constructor and Description |
|---|
PrivAESWith3DESKeyExtension(int keyBytes)
Constructor.
|
| Modifier and Type | Method and 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.
|
asHex, decrypt, encrypt, getDecryptParamsLength, getEncryptedLength, getMaxKeyLength, getMinKeyLengthdoDecrypt, doFinal, doFinalWithPadding, doInit, isSupportedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDefaultIDisSupportedprotected OID oid
public PrivAESWith3DESKeyExtension(int keyBytes)
keyBytes - Length of key, must be 16, 24 or 32.IllegalArgumentException - if keyBytes is illegalpublic byte[] extendShortKey(byte[] shortKey,
OctetString password,
byte[] engineID,
AuthenticationProtocol authProtocol)
PrivacyProtocolextendShortKey in interface PrivacyProtocolextendShortKey in class PrivAESshortKey - 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)
NonStandardSecurityProtocolsetID in interface NonStandardSecurityProtocolnewOID - the new security protcol ID for the security protocol class called.public OID getID()
PrivacyProtocolgetID in interface PrivacyProtocolgetID in interface SecurityProtocolOID instance.Copyright © 2020 SNMP4J.org. All rights reserved.