The PasswordToKey method in the IAuthenticationProvider implementation classes is called each time when a SNMPv3 message is encrypted or decrypted. All it does is to translate the password and engine Id into a key to be used in the following hash method.
The PasswordToKey method is time-consuming. As it's pure functional, the same password and engine Id combination will always produces the same output. It would be good if the result can be cached. Then when the same input is provided again, the cached key can be returned. This would improve the performance of encryption/decryption process dramatically.
The PasswordToKey method is time-consuming. As it's pure functional, the same password and engine Id combination will always produces the same output. It would be good if the result can be cached. Then when the same input is provided again, the cached key can be returned. This would improve the performance of encryption/decryption process dramatically.