本文整理汇总了Java中org.snmp4j.security.PrivAES128类的典型用法代码示例。如果您正苦于以下问题:Java PrivAES128类的具体用法?Java PrivAES128怎么用?Java PrivAES128使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PrivAES128类属于org.snmp4j.security包,在下文中一共展示了PrivAES128类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: convertPrivacyProtocol
import org.snmp4j.security.PrivAES128; //导入依赖的package包/类
private OID convertPrivacyProtocol(String privacyProtocol) {
if (privacyProtocol == null) {
return null;
}
if ("DES".equals(privacyProtocol)) {
return PrivDES.ID;
} else if ("TRIDES".equals(privacyProtocol)) {
return Priv3DES.ID;
} else if ("AES128".equals(privacyProtocol)) {
return PrivAES128.ID;
} else if ("AES192".equals(privacyProtocol)) {
return PrivAES192.ID;
} else if ("AES256".equals(privacyProtocol)) {
return PrivAES256.ID;
} else {
throw new IllegalArgumentException("Unknown privacy protocol: " + privacyProtocol);
}
}
开发者ID:HydAu,项目名称:Camel,代码行数:19,代码来源:SnmpOIDPoller.java
示例2: privType
import org.snmp4j.security.PrivAES128; //导入依赖的package包/类
private OID privType(SnmpV3Target v3Target) {
switch (v3Target.getPrivType()) {
case DES:
return PrivDES.ID;
case DES3:
return Priv3DES.ID;
case AES128:
return PrivAES128.ID;
case AES192:
return PrivAES192.ID;
case AES256:
return PrivAES256.ID;
default:
throw new IllegalArgumentException("unrecognized privacy type");
}
}
开发者ID:soulwing,项目名称:tnm4j,代码行数:17,代码来源:UserTargetStrategy.java
示例3: convertPrivProtocol
import org.snmp4j.security.PrivAES128; //导入依赖的package包/类
private OID convertPrivProtocol(String privProtocol) {
/*
* Returning null here is okay because the SNMP4J library supports
* this value as null when creating the SNMP session.
*/
if (StringUtils.isBlank(privProtocol)) {
return null;
}
if (privProtocol.equals("DES")) {
return PrivDES.ID;
} else if ((privProtocol.equals("AES128")) || (privProtocol.equals("AES"))) {
return PrivAES128.ID;
} else if (privProtocol.equals("AES192")) {
return PrivAES192.ID;
} else if (privProtocol.equals("AES256")) {
return PrivAES256.ID;
} else {
throw new IllegalArgumentException("Privacy protocol " + privProtocol + " not supported");
}
}
开发者ID:qoswork,项目名称:opennmszh,代码行数:23,代码来源:Snmp4JAgentConfig.java
示例4: convertPrivProtocol
import org.snmp4j.security.PrivAES128; //导入依赖的package包/类
private OID convertPrivProtocol(String privProtocol) {
/*
* Returning null here is okay because the SNMP4J library supports
* this value as null when creating the SNMP session.
*/
if (privProtocol == null) {
return null;
}
if (privProtocol.equals("DES")) {
return PrivDES.ID;
} else if ((privProtocol.equals("AES128")) || (privProtocol.equals("AES"))) {
return PrivAES128.ID;
} else if (privProtocol.equals("AES192")) {
return PrivAES192.ID;
} else if (privProtocol.equals("AES256")) {
return PrivAES256.ID;
} else {
throw new IllegalArgumentException("Privacy protocol " + privProtocol + " not supported");
}
}
开发者ID:vishwaabhinav,项目名称:OpenNMS,代码行数:23,代码来源:Snmp4JAgentConfig.java
示例5: privProtocol
import org.snmp4j.security.PrivAES128; //导入依赖的package包/类
private OID privProtocol() {
PrivProtocol pp = PrivProtocol.valueOf(conf("privProtocol", PrivProtocol.NONE));
switch (pp) {
case DES: return PrivDES.ID;
case AES128: return PrivAES128.ID;
case AES192: return PrivAES192.ID;
case AES256: return PrivAES256.ID;
case _3DES: return Priv3DES.ID;
default: return null;
}
}
开发者ID:genman,项目名称:rhq-plugins,代码行数:12,代码来源:SnmpComponent.java
注:本文中的org.snmp4j.security.PrivAES128类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论