Hi Jochen,
Thanks a lot for your reply.
I implemented a temporary patch to Priv3DES for my testing. Could you please
review it?
public byte[] extendShortKey(byte[] shortKey, OctetString password,
byte[] engineID,
AuthenticationProtocol authProtocol) {
int length = shortKey.length;
byte[] extendedKey = new byte[getMinKeyLength()];
System.arraycopy(shortKey, 0, extendedKey, 0, shortKey.length);
byte[] key = new byte[getMinKeyLength()];
System.arraycopy(shortKey, 0, key, 0, shortKey.length);
while (length < getMinKeyLength()) {
key = authProtocol.passwordToKey(new OctetString(key, 0, length),
engineID);
int copyBytes = Math.min(getMinKeyLength() - length,
authProtocol.getDigestLength());
System.arraycopy(key, 0, extendedKey, length, copyBytes);
length += copyBytes;
}
return extendedKey;
}
Best Regards,
Yue
_______________________________________________
SNMP4J mailing list
[email protected]
http://lists.agentpp.org/mailman/listinfo/snmp4j