171
security strength) are available for the device. A more secure algorithm calculates slower. DES is
enough to meet general security requirements.
3desmd5: Calculates the encrypted form for the encryption key by using the 3DES encryption
algorithm and HMAC-MD5 authentication algorithm.
3dessha: Calculates the encrypted form for the encryption key by using the 3DES encryption
algorithm and HMAC-SHA1 authentication algorithm.
md5: Calculates the encrypted form for the authentication key or encryption key by using the
HMAC-MD5 authentication algorithm and AES or DES encryption algorithm. When the
HMAC-MD5 authentication algorithm is used, you can get the same authentication key or
encryption key in encrypted form regardless of whether the AES or DES encryption algorithm is
used.
sha: Calculates the encrypted form for the authentication key or encryption key by using
HMAC-SHA1 authentication algorithm and AES or DES encryption algorithm. When the
HMAC-SHA1 authentication algorithm is used, you can get the same authentication key or
encryption key in encrypted form regardless of whether the AES or DES encryption algorithm is
used.
local-engineid: Uses the local engine ID to calculate the encrypted form for the key.. You can
configure the local engine ID by using the snmp-agent local-engineid command.
specified-engineid engineid: Uses a user-defined engine ID to calculate the encrypted form for the
key. The engineid argument is an even number of case-insensitive hexadecimal characters. All-zero
and all-F strings are invalid. The even number is in the range of 10 to 64.
Usage guidelines
Make sure the SNMP agent is enabled before you execute the snmp-agent calculate-password
command.
For security purposes, use the encrypted-form key generated using this command when you create
an SNMPv3 users by specifying the cipher keyword in the snmp-agent usm-user v3 command.
The encrypted form of the key is valid only when the engine ID specified for key conversion exists.
Examples
# Use the local engine ID and the SHA-1 algorithm to calculate the encrypted form for key authkey.
<Sysname> system-view
[Sysname] snmp-agent calculate-password authkey mode sha local-engineid
The encrypted key is: 09659EC5A9AE91BA189E5845E1DDE0CC
Related commands
snmp-agent local-engineid
snmp-agent usm-user v3
snmp-agent community
Use snmp-agent community to configure an SNMPv1 or SNMPv2c community.
Use undo snmp-agent community to delete an SNMPv1 or SNMPv2c community.
Syntax
In VACM mode:
snmp-agent community { read | write } [ simple | cipher ] community-name [ mib-view
view-name ] [ acl { ipv4-acl-number | name ipv4-acl-name } | acl ipv6 { ipv6-acl-number | name
ipv6-acl-name } ] *
undo snmp-agent community [ cipher ] community-name
In RBAC mode: