Module org.snmp4j

Class PrivAESWith3DESKeyExtension

    • Field Detail

      • oid

        protected OID oid
    • Constructor Detail

      • PrivAESWith3DESKeyExtension

        public PrivAESWith3DESKeyExtension​(int keyBytes)
        keyBytes - Length of key, must be 16, 24 or 32.
        java.lang.IllegalArgumentException - if keyBytes is illegal
    • Method Detail

      • extendShortKey

        public byte[] extendShortKey​(byte[] shortKey,
                                     OctetString password,
                                     byte[] engineID,
                                     AuthenticationProtocol authProtocol)
        Description copied from interface: PrivacyProtocol
        Extend a localized key that is too short. Some privacy protocols require a key that is longer than the key generated by the password-to-key algorithm of the authentication protocol. This function extends a short key to the required length.
        Specified by:
        extendShortKey in interface PrivacyProtocol
        extendShortKey in class PrivAES
        shortKey - the short key that was generated using AuthenticationProtocol.passwordToKey(org.snmp4j.smi.OctetString, byte[]) function.
        password - the password to use for key extension.
        engineID - the SNMP engine ID of the authoritative engine.
        authProtocol - the authentication protocol that should be used.
        the extended key or shortKey if no extension is needed.
      • setID

        public void setID​(OID newOID)
        Description copied from interface: NonStandardSecurityProtocol
        Assign a new ID to a non-standard security protocol instance.
        Specified by:
        setID in interface NonStandardSecurityProtocol
        newOID - the new security protcol ID for the security protocol class called.