|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SnmpUsmKeyHandler
This interface allows you to compute key localization and delta generation. It is useful when adding user in USM MIB. An instance of SnmpUsmKeyHandler
is associated to each SnmpEngine
object.
When computing key, an authentication algorithm is needed. The supported ones are : usmHMACMD5AuthProtocol and usmHMACSHAAuthProtocol.
Field Summary | |
---|---|
static int |
DES_DELTA_SIZE
DES privacy algorithm delta size. |
static int |
DES_KEY_SIZE
DES privacy algorithm key size. |
Method Summary | |
---|---|
byte[] |
calculateAuthDelta(String algoName,
byte[] oldKey,
byte[] newKey,
byte[] random)
Calculate the delta parameter needed when processing key change. |
byte[] |
calculatePrivDelta(String algoName,
byte[] oldKey,
byte[] newKey,
byte[] random,
int deltaSize)
Calculate the delta parameter needed when processing key change for a privacy algorithm. |
byte[] |
localizeAuthKey(String algoName,
byte[] key,
SnmpEngineId engineId)
Localize the passed key using the passed SnmpEngineId . |
byte[] |
localizePrivKey(String algoName,
byte[] key,
SnmpEngineId engineId,
int keysize)
Localize the passed privacy key using the passed SnmpEngineId . |
byte[] |
password_to_key(String algoName,
String password)
Translate a password to a key. |
Field Detail |
---|
static final int DES_KEY_SIZE
static final int DES_DELTA_SIZE
Method Detail |
---|
byte[] password_to_key(String algoName, String password) throws IllegalArgumentException
algoName
- The authentication algorithm to use.password
- Password to convert.
IllegalArgumentException
- If the algorithm is unknown.byte[] localizeAuthKey(String algoName, byte[] key, SnmpEngineId engineId) throws IllegalArgumentException
SnmpEngineId
. It MUST be compliant to RFC 2574 description.
algoName
- The authentication algorithm to use.key
- The key to localize;engineId
- The Id used to localize the key.
IllegalArgumentException
- If the algorithm is unknown.byte[] localizePrivKey(String algoName, byte[] key, SnmpEngineId engineId, int keysize) throws IllegalArgumentException
SnmpEngineId
. It MUST be compliant to RFC 2574 description.
algoName
- The authentication algorithm to use.key
- The key to localize;engineId
- The Id used to localize the key.keysize
- The privacy algorithm key size.
IllegalArgumentException
- If the algorithm is unknown.byte[] calculateAuthDelta(String algoName, byte[] oldKey, byte[] newKey, byte[] random) throws IllegalArgumentException
algoName
- The authentication algorithm to use.oldKey
- The old key.newKey
- The new key.random
- The random value.
IllegalArgumentException
- If the algorithm is unknown.byte[] calculatePrivDelta(String algoName, byte[] oldKey, byte[] newKey, byte[] random, int deltaSize) throws IllegalArgumentException
algoName
- The authentication algorithm to use.oldKey
- The old key.newKey
- The new key.random
- The random value.deltaSize
- The algorithm delta size.
IllegalArgumentException
- If the algorithm is unknown.
|
Open Source build 02 opendmk-1.0-b02 2007.10.01_19:17:46_MEST |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |