Module org.snmp4j

Class PrivacyGeneric

    • Field Detail

      • protocolId

        protected java.lang.String protocolId
      • protocolClass

        protected java.lang.String protocolClass
      • keyBytes

        protected int keyBytes
      • salt

        protected Salt salt
      • initVectorLength

        protected int initVectorLength
    • Constructor Detail

      • PrivacyGeneric

        public PrivacyGeneric()
    • Method Detail

      • doInit

        protected javax.crypto.Cipher doInit​(byte[] encryptionKey,
                                             byte[] initVect)
                                      throws javax.crypto.NoSuchPaddingException,
                                             java.security.NoSuchAlgorithmException,
                                             java.security.InvalidKeyException,
                                             java.security.InvalidAlgorithmParameterException
        Throws:
        javax.crypto.NoSuchPaddingException
        java.security.NoSuchAlgorithmException
        java.security.InvalidKeyException
        java.security.InvalidAlgorithmParameterException
      • doFinal

        protected byte[] doFinal​(byte[] unencryptedData,
                                 int offset,
                                 int length,
                                 javax.crypto.Cipher alg)
                          throws javax.crypto.BadPaddingException,
                                 javax.crypto.IllegalBlockSizeException,
                                 javax.crypto.ShortBufferException
        Throws:
        javax.crypto.BadPaddingException
        javax.crypto.IllegalBlockSizeException
        javax.crypto.ShortBufferException
      • doFinalWithPadding

        protected byte[] doFinalWithPadding​(byte[] unencryptedData,
                                            int offset,
                                            int length,
                                            javax.crypto.Cipher alg)
                                     throws javax.crypto.IllegalBlockSizeException,
                                            javax.crypto.BadPaddingException,
                                            javax.crypto.ShortBufferException
        Throws:
        javax.crypto.IllegalBlockSizeException
        javax.crypto.BadPaddingException
        javax.crypto.ShortBufferException
      • doDecrypt

        protected byte[] doDecrypt​(byte[] cryptedData,
                                   int offset,
                                   int length,
                                   byte[] decryptionKey,
                                   byte[] iv)
      • isSupported

        public boolean isSupported()
        Description copied from interface: SecurityProtocol
        Checks whether this security protocol is actually supported by this Java runtime environment.
        Specified by:
        isSupported in interface SecurityProtocol
        Returns:
        true if this security protocol is supported, false otherwise.