]> git.basschouten.com Git - openhab-addons.git/blob
917e5ef70d9d2d4afc600d215ae984f7fddf3586
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.snmp.internal.types;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.snmp4j.security.AuthHMAC128SHA224;
17 import org.snmp4j.security.AuthHMAC192SHA256;
18 import org.snmp4j.security.AuthHMAC256SHA384;
19 import org.snmp4j.security.AuthHMAC384SHA512;
20 import org.snmp4j.security.AuthMD5;
21 import org.snmp4j.security.AuthSHA;
22 import org.snmp4j.smi.OID;
23
24 /**
25  * The {@link SnmpAuthProtocol} enum defines the possible authentication protocols for v3
26  *
27  * @author Jan N. Klug - Initial contribution
28  */
29 @NonNullByDefault
30 public enum SnmpAuthProtocol {
31     MD5(AuthMD5.ID),
32     SHA(AuthSHA.ID),
33     HMAC128SHA224(AuthHMAC128SHA224.ID),
34     HMAC192SHA256(AuthHMAC192SHA256.ID),
35     HMAC256SHA384(AuthHMAC256SHA384.ID),
36     HMAC384SHA512(AuthHMAC384SHA512.ID);
37
38     private final OID oid;
39
40     SnmpAuthProtocol(OID oid) {
41         this.oid = oid;
42     }
43
44     /**
45      * get the OID for this authentication protocol
46      *
47      * @return the corresponding OID
48      */
49     public OID getOid() {
50         return oid;
51     }
52 }