[SNMP4J] Special Characters in Passphrases

Frank Fock fock at agentpp.com
Wed Mar 26 23:46:28 CET 2014

Hi Peter,

SNMP4J uses the full 8bit per byte provided to the passwordToKey method call
as an OctetString passphrase. Thus, no character conversion is done within
SNMP4J. You have thus the full control how your password is converted into
an OctetString (bytes) from a character string.
If you use the OctetString(String) constructor then String.getBytes() is 
and thus the platforms default characters set is used.

If you want/need to use a different character set, the use the 
constructor instead.

Of course, you will still have to know the character set use by the 
agent too,
because both have to match.

Best regards,

Am 26.03.2014 11:56, schrieb McCarthy, Peter CIV NAWCTSD,
> Good morning all,
> We have SNMP4J in a production system and I've noticed that using special characters in the authentication and privacy phrases doesn't seem to work.  For example, "Password12 at 345678" will fail where "Password12345678" will succeed.  My suspicion is that it is a limitation of the device I'm talking to and not of the SNMP4J library.  Is my assessment correct?  Or are there limitations on the character set for pass phrases that are identified somewhere deep within the SNMP RFCs?
> Thanks,
> Peter McCarthy
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> https://s16675406.onlinehome-server.info/mailman/listinfo/snmp4j

Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
Phone: +49 7024 8688230
Fax:   +49 7024 8688231

More information about the SNMP4J mailing list