com.outbackinc.services.protocol.snmp.USM
Class USMSecurityInfo

java.lang.Object
  |
  +--com.outbackinc.services.protocol.snmp.USM.USMSecurityInfo
All Implemented Interfaces:
java.io.Serializable, SnmpSecurityInfo

public class USMSecurityInfo
extends java.lang.Object
implements SnmpSecurityInfo, java.io.Serializable

The USMSecurityInfo class implements the SnmpSecurityInfo interface for user-based security model for SNMP versions (SNMPv3). A created class may be shared between many SNMPv3 SnmpSecureSessions.

See Also:
USMSecurityModel, Serialized Form

Field Summary
static int Auth_MD5
          MD5 Authentication scheme
static int Auth_SHA
          SHA Authentication scheme
static int Priv_DES
          DES Privacy scheme
 
Constructor Summary
USMSecurityInfo(byte[] bUserName, byte[] bAuthenticationPassword, byte[] bPrivacyPassword, int iAuthenticationScheme, int iPrivacyScheme, byte cbSecurityLevel)
          Constructs a security information entity.
USMSecurityInfo(java.lang.String szUserName, java.lang.String szAuthenticationPassword, java.lang.String szPrivacyPassword, int iAuthenticationScheme, int iPrivacyScheme, byte cbSecurityLevel)
          Deprecated. as of jSNMP v3.1.1 by USMSecurityInfo(byte[] bUserName, byte[] bAuthenticationPassword, byte[] bPrivacyPassword, int iAuthenticationScheme, int iPrivacyScheme, byte cbSecurityLevel)
 
Method Summary
 int getAuthenticationScheme()
          Get the authentication scheme.
 java.lang.String getAuthPassword()
          Deprecated. as of jSNMP v3.1.1 by getAuthPasswordBytes()
 byte[] getAuthPasswordBytes()
          Get the authentication password.
 int getPrivacyScheme()
          Get the privacy scheme
 java.lang.String getPrivPassword()
          Deprecated. as of jSNMP v3.1.1 by getPrivPasswordBytes()
 byte[] getPrivPasswordBytes()
          Get the privacy password.
 byte getSecurityLevel()
          Get the security level.
 int getSecurityModelID()
          Get the ID of the security model.
 java.lang.String getUserName()
          Deprecated. as of jSNMP v3.1.1 by getUserNameBytes()
 byte[] getUserNameBytes()
          Get the user name.
 boolean supportedBySnmpVersion(int iSnmpVersion)
          Determines if the given SNMP version supports this security info.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Auth_SHA

public static final int Auth_SHA
SHA Authentication scheme

Auth_MD5

public static final int Auth_MD5
MD5 Authentication scheme

Priv_DES

public static final int Priv_DES
DES Privacy scheme
Constructor Detail

USMSecurityInfo

public USMSecurityInfo(byte[] bUserName,
                       byte[] bAuthenticationPassword,
                       byte[] bPrivacyPassword,
                       int iAuthenticationScheme,
                       int iPrivacyScheme,
                       byte cbSecurityLevel)
                throws SnmpSecurityException,
                       java.lang.IllegalArgumentException
Constructs a security information entity. This is the preferred constructor when using VMs with non-ASCII encodings.
Parameters:
bUserName - user name
bAuthenticationPassword - authentication password
bPrivacyPassword - privacy password
iAuthenticationScheme - authentication scheme
iPrivacyScheme - privacy scheme
cbSecurityLevel - security level
Throws:
java.lang.IllegalArgumentException - if either bUserName, bAuthenticationPassword, or bPrivacyPassword are null or iAuthenticationScheme not USMSecurityInfo.Auth_NONE, USMSecurityInfo.Auth_SHA, or USMSecurityInfo.Auth_MD5 or iPrivacyScheme not USMSecurityInfo.Priv_NONE or USMSecurityInfo.Priv_DES or cbSecurityLevel not SnmpSecurityLevels.noAuthNoPriv, SnmpSecurityLevels.AuthNoPriv, or SnmpSecurityLevels.AuthPriv
SnmpSecurityException - if a MessageDigest algorithm is not available in the package supplied by the security provider or if a particular the provider is requested but is not available in the MessageDigest environment

USMSecurityInfo

public USMSecurityInfo(java.lang.String szUserName,
                       java.lang.String szAuthenticationPassword,
                       java.lang.String szPrivacyPassword,
                       int iAuthenticationScheme,
                       int iPrivacyScheme,
                       byte cbSecurityLevel)
                throws SnmpSecurityException,
                       java.lang.IllegalArgumentException
Deprecated. as of jSNMP v3.1.1 by USMSecurityInfo(byte[] bUserName, byte[] bAuthenticationPassword, byte[] bPrivacyPassword, int iAuthenticationScheme, int iPrivacyScheme, byte cbSecurityLevel)

Constructs a security information entity.
Parameters:
szUserName - user name
szAuthenticationPassword - authentication password
szPrivacyPassword - privacy password
iAuthenticationScheme - authentication scheme
iPrivacyScheme - privacy scheme
cbSecurityLevel - security level
Throws:
java.lang.IllegalArgumentException - if either szUserName, szAuthenticationPassword, or szPrivacyPassword are null or iAuthenticationScheme not USMSecurityInfo.Auth_NONE, USMSecurityInfo.Auth_SHA, or USMSecurityInfo.Auth_MD5 or iPrivacyScheme not USMSecurityInfo.Priv_NONE or USMSecurityInfo.Priv_DES or cbSecurityLevel not SnmpSecurityLevels.noAuthNoPriv, SnmpSecurityLevels.AuthNoPriv, or SnmpSecurityLevels.AuthPriv
SnmpSecurityException - if a MessageDigest algorithm is not available in the package supplied by the security provider or if a particular the provider is requested but is not available in the MessageDigest environment
Method Detail

getSecurityModelID

public int getSecurityModelID()
Description copied from interface: SnmpSecurityInfo
Get the ID of the security model. CSM and USM values are defined in the SnmpSecurityModel interface. New security model class IDs should not conflict and be greater than 255.
Specified by:
getSecurityModelID in interface SnmpSecurityInfo
Following copied from interface: com.outbackinc.services.protocol.snmp.SnmpSecurityInfo
Returns:
security model ID

getSecurityLevel

public byte getSecurityLevel()
Description copied from interface: SnmpSecurityInfo
Get the security level. Possible values are defined in SnmpSecurityLevels.
Specified by:
getSecurityLevel in interface SnmpSecurityInfo
Returns:
SnmpSecurityLevels.noAuthNoPriv, SnmpSecurityLevels.AuthNoPriv, or SnmpSecurityLevels.AuthPriv.

getUserName

public java.lang.String getUserName()
Deprecated. as of jSNMP v3.1.1 by getUserNameBytes()

Get the user name.
Returns:
user name

getPrivPassword

public java.lang.String getPrivPassword()
Deprecated. as of jSNMP v3.1.1 by getPrivPasswordBytes()

Get the privacy password.
Returns:
privacy password

getAuthPassword

public java.lang.String getAuthPassword()
Deprecated. as of jSNMP v3.1.1 by getAuthPasswordBytes()

Get the authentication password.
Returns:
authentication password

getUserNameBytes

public byte[] getUserNameBytes()
Get the user name. This is the preferred method when using VMs with non-ASCII encodings.
Returns:
user name

getPrivPasswordBytes

public byte[] getPrivPasswordBytes()
Get the privacy password. This is the preferred method when using VMs with non-ASCII encodings.
Returns:
privacy password

getAuthPasswordBytes

public byte[] getAuthPasswordBytes()
Get the authentication password. This is the preferred method when using VMs with non-ASCII encodings.
Returns:
authentication password

getAuthenticationScheme

public int getAuthenticationScheme()
Get the authentication scheme.
Returns:
USMSecurityInfo.Auth_SHA, or USMSecurityInfo.Auth_MD5

supportedBySnmpVersion

public boolean supportedBySnmpVersion(int iSnmpVersion)
Description copied from interface: SnmpSecurityInfo
Determines if the given SNMP version supports this security info.
Specified by:
supportedBySnmpVersion in interface SnmpSecurityInfo
Returns:
true if the SNMP version is SnmpConstants.SNMP_VERSION_3
See Also:
SnmpConstants

getPrivacyScheme

public int getPrivacyScheme()
Get the privacy scheme
Returns:
USMSecurityInfo.Priv_DES


Home  Services  Products  Purchase  Contact Us  About Us  Legal  Ceramics
Copyright © 2003-2008 jSNMP Enterprises All rights reserved.