public abstract class PrivAESWith3DESKeyExtension extends PrivAES
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!cipherPool, salt
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.
|
asHex, decrypt, encrypt, getDecryptParamsLength, getEncryptedLength, getMaxKeyLength, getMinKeyLength
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getID
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)
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.Copyright © 2023 SNMP4J.org. All rights reserved.