Java源码示例:org.snmp4j.security.Priv3DES

示例1
/**
 * Method to return the private protocol given the property
 * @param privProtocol property
 * @return protocol
 */
public static OID getPriv(String privProtocol) {
    switch (privProtocol) {
    case "DES":
        return PrivDES.ID;
    case "3DES":
        return Priv3DES.ID;
    case "AES128":
        return PrivAES128.ID;
    case "AES192":
        return PrivAES192.ID;
    case "AES256":
        return PrivAES256.ID;
    default:
        return null;
    }
}
 
示例2
/**
 * Method to return the private protocol given the property
 * @param privProtocol property
 * @return protocol
 */
public static OID getPriv(String privProtocol) {
    switch (privProtocol) {
    case "DES":
        return PrivDES.ID;
    case "3DES":
        return Priv3DES.ID;
    case "AES128":
        return PrivAES128.ID;
    case "AES192":
        return PrivAES192.ID;
    case "AES256":
        return PrivAES256.ID;
    default:
        return null;
    }
}