HashPassword Event

Fired before and after a password is hashed.

Syntax

ANSI (Cross Platform)
virtual int FireHashPassword(SNMPTCPTrapMgrHashPasswordEventParams *e);
typedef struct {
const char *Password;
int AuthAlgorithm;
char *Hash; int reserved; } SNMPTCPTrapMgrHashPasswordEventParams; Unicode (Windows) virtual INT FireHashPassword(SNMPTCPTrapMgrHashPasswordEventParams *e);
typedef struct {
LPCWSTR Password;
INT AuthAlgorithm;
LPWSTR Hash; INT reserved; } SNMPTCPTrapMgrHashPasswordEventParams;
- (void)onHashPassword:(NSString*)password :(int)authAlgorithm :(NSString**)hash;
#define EID_SNMPTCPTRAPMGR_HASHPASSWORD 11

virtual INT IPWORKSSNMP_CALL FireHashPassword(LPSTR &lpszPassword, INT &iAuthAlgorithm, LPSTR &lpszHash);

Remarks

SNMPv3 passwords are hashed in order to obtain authentication and encryption keys. This is an expensive operation, and in certain situations it may be preferable to store the hashed passwords externally and supply them on demand.

If a hash is required, the event fires with an empty string in the Hash parameter. In this case, you can choose to supply a value for the hash and stop the class from computing the hash.

The event also fires every time a hash is computed. In this case, the Hash parameter contains the value of the computed hash.

AuthAlgorithm contains either 1 for HMAC-MD5-96, 2 for HMAC-SHA-96 or 3 for HMAC-192-SHA-256

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks SNMP 2020 C++ Edition - Version 20.0 [Build 8202]