| 
HOME | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ireasoning.protocol.snmp.UsmUser
This class represents user information (in SNMPV3)
| Field Summary | |
static byte | 
AUTH_NO_PRIV
securityLevel: Auth No Privacy  | 
static byte | 
AUTH_PRIV
securityLevel: Auth and Privacy  | 
static byte | 
NO_AUTH_NO_PRIV
securityLevel: No Auth No Privacy  | 
| Constructor Summary | |
UsmUser(String userName,
        String authProtocol,
        byte[] authKey,
        byte[] privKey,
        byte[] engineID)
Constructs UsmUser object.  | 
|
UsmUser(String userName,
        String authProtocol,
        int privProtocol,
        byte[] authKey,
        byte[] privKey,
        byte[] engineID)
Constructs UsmUser object.  | 
|
UsmUser(String userName,
        String authProtocol,
        int privProtocol,
        byte securityLevel,
        String authPassword,
        String privPassword,
        byte[] engineID,
        boolean keyExpansionWithEngineID)
Constructs UsmUser object.  | 
|
UsmUser(String userName,
        String authProtocol,
        String authPassword,
        int privProtocol,
        String privPassword,
        byte[] engineID)
Constructs UsmUser object.  | 
|
UsmUser(String userName,
        String authProtocol,
        String authPassword,
        int privProtocol,
        String privPassword,
        byte[] engineID,
        boolean keyExpansionWithEngineID)
Constructs UsmUser object.  | 
|
UsmUser(String userName,
        String authProtocol,
        String authPassword,
        String privPassword,
        byte[] engineID)
Constructs UsmUser object.  | 
|
| Method Summary | |
static byte[] | 
generateKey(String algorithm,
            String password,
            byte[] engineID)
Creates localized key  | 
static byte[] | 
generateKey(String authProtocol,
            String password,
            byte[] engineID,
            int privProtocol,
            boolean keyExpansionWithEngineID)
Generates privacy key for different privacy protocols  | 
 byte[] | 
getAuthKey()
Returns localized auth key  | 
 int | 
getAuthLength()
Returns the digest length of the auth protocol  | 
 String | 
getAuthPassword()
Returns auth password  | 
 String | 
getAuthProtocol()
Returns auth protocol  | 
 byte[] | 
getEngineID()
Returns engine ID  | 
 boolean | 
getKeyExpansionWithEngineID()
 | 
static int | 
getPriv(String priv)
 | 
 byte[] | 
getPrivKey()
Returns localized privacy key  | 
 String | 
getPrivPassword()
Returns privacy password  | 
 int | 
getPrivProtocol()
Returns privacy protocol  | 
 byte | 
getSecurityLevel()
Returns security level  | 
 String | 
getUserName()
Returns USM user name  | 
static void | 
main(String[] args)
 | 
 void | 
setAuthKey(byte[] key)
Sets a new localized auth key  | 
 void | 
setAuthPassword(String authPassword)
Sets a new auth password  | 
 void | 
setAuthProtocol(String authProtocol)
Sets a new auth protocol  | 
 void | 
setEngineID(byte[] engineID)
Sets a new engineID.  | 
 void | 
setKeyExpansionWithEngineID(boolean b)
 | 
 void | 
setPrivKey(byte[] key)
Sets a new localized privacy key  | 
 void | 
setPrivPassword(String privPassword)
Sets a new privacy password  | 
 void | 
setPrivProtocol(int priv)
Sets a new privacy protocol  | 
 void | 
setSecurityLevel(byte level)
Sets a new security level  | 
 void | 
setUserName(String name)
Sets a new USM user name  | 
 String | 
toString()
 | 
 void | 
updateKeys()
Calculates localized keys  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
public static final byte NO_AUTH_NO_PRIV
public static final byte AUTH_NO_PRIV
public static final byte AUTH_PRIV
| Constructor Detail | 
public UsmUser(String userName,
               String authProtocol,
               String authPassword,
               String privPassword,
               byte[] engineID)
userName - user nameauthProtocol - authentication protocol, one of {SnmpConst2.MD5,
 SnmpConst2.SHA}authPassword - authentication passwordprivPassword - privacy protocol password
public UsmUser(String userName,
               String authProtocol,
               String authPassword,
               int privProtocol,
               String privPassword,
               byte[] engineID,
               boolean keyExpansionWithEngineID)
keyExpansionWithEngineID - For AES 192 and 256, localized key will be expanded with the value of engineID.userName - user nameauthProtocol - authentication protocol, one of {SnmpConst.MD5,
 SnmpConst.SHA, SnmpConst.SHA224, SnmpConst.SHA256, SnmpConst.SHA384, SnmpConst.SHA512}privProtocol - privacy protocol. One of {SnmpConst.DES, SnmpConst.AES, SnmpConst.AES192, SnmpConst.AES256}authPassword - authentication passwordprivPassword - privacy protocol password
public UsmUser(String userName,
               String authProtocol,
               String authPassword,
               int privProtocol,
               String privPassword,
               byte[] engineID)
userName - user nameauthProtocol - authentication protocol, one of {SnmpConst.MD5,
 SnmpConst.SHA, SnmpConst.SHA224, SnmpConst.SHA256, SnmpConst.SHA384, SnmpConst.SHA512}privProtocol - privacy protocol. One of {SnmpConst.DES, SnmpConst.AES, SnmpConst.AES192, SnmpConst.AES256}authPassword - authentication passwordprivPassword - privacy protocol password
public UsmUser(String userName,
               String authProtocol,
               int privProtocol,
               byte securityLevel,
               String authPassword,
               String privPassword,
               byte[] engineID,
               boolean keyExpansionWithEngineID)
userName - user nameauthProtocol - authentication protocol, one of {SnmpConst.MD5,
 SnmpConst.SHA, SnmpConst.SHA224, SnmpConst.SHA256, SnmpConst.SHA384, SnmpConst.SHA512}privProtocol - privacy protocol. One of {SnmpConst.DES, SnmpConst.AES, SnmpConst.AES192, SnmpConst.AES256}authPassword - authentication passwordprivPassword - privacy protocol pass
public UsmUser(String userName,
               String authProtocol,
               byte[] authKey,
               byte[] privKey,
               byte[] engineID)
userName - user nameauthProtocol - authentication protocol, one of {SnmpConst2.MD5,
 SnmpConst2.SHA}authKey - localized auth keyprivKey - localized priv key
public UsmUser(String userName,
               String authProtocol,
               int privProtocol,
               byte[] authKey,
               byte[] privKey,
               byte[] engineID)
userName - user nameauthProtocol - authentication protocol, one of {SnmpConst2.MD5,
 SnmpConst2.SHA}authKey - localized authentication passwordprivKey - localized privacy protocol pass| Method Detail | 
public static void main(String[] args)
public byte[] getAuthKey()
public void setAuthKey(byte[] key)
key - localized auth keypublic String getAuthPassword()
public String getAuthProtocol()
public int getAuthLength()
public int getPrivProtocol()
public void setPrivProtocol(int priv)
public byte[] getPrivKey()
public void setPrivKey(byte[] key)
key - localized priv keypublic String getPrivPassword()
public byte getSecurityLevel()
public String getUserName()
public void setUserName(String name)
public byte[] getEngineID()
public void setSecurityLevel(byte level)
public void setAuthProtocol(String authProtocol)
public void setAuthPassword(String authPassword)
public void setPrivPassword(String privPassword)
public void setEngineID(byte[] engineID)
public String toString()
public void setKeyExpansionWithEngineID(boolean b)
public boolean getKeyExpansionWithEngineID()
public void updateKeys()
public static byte[] generateKey(String authProtocol,
                                 String password,
                                 byte[] engineID,
                                 int privProtocol,
                                 boolean keyExpansionWithEngineID)
                          throws NoSuchAlgorithmException
privProtocol - one of {SnmpConst.DES", SnmpConst.AES, SnmpConst.AES192, SnmpConst.AES256 }
NoSuchAlgorithmException
public static byte[] generateKey(String algorithm,
                                 String password,
                                 byte[] engineID)
                          throws NoSuchAlgorithmException
algorithm - algorithm for creating digest, either SnmpConst1.MD5 or SnmpConst2.SHA.password - auth or priv passwordsengineID - SNMPv3 engine ID
NoSuchAlgorithmExceptionpublic static int getPriv(String priv)
priv - privacy protocol. If priv is null, SnmpConst.DES is returned. 
 Valid values are: DES, AES, AES192, AES256
  | 
HOME | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||