Class Crypto

java.lang.Object
org.apache.commons.crypto.Crypto

public final class Crypto extends Object
Provides diagnostic information about Commons Crypto and keys for native class loading.
  • Field Details

  • Constructor Details

  • Method Details

    • getComponentName

      public static String getComponentName()
      Gets the component version of Apache Commons Crypto.

      This implementation relies on the VERSION properties file which must be set up with the correct contents by the build process. This is done automatically by Maven.

      Returns:
      the version; may be null if not found
    • getComponentVersion

      public static String getComponentVersion()
      Gets the component version of Apache Commons Crypto.

      This implementation relies on the VERSION properties file which must be set up with the correct contents by the build process. This is done automatically by Maven.

      Returns:
      the version; may be null if not found
    • getLoadingError

      public static Throwable getLoadingError()
      The loading error throwable, if loading failed.
      Returns:
      null, unless loading failed.
    • isNativeCodeLoaded

      public static boolean isNativeCodeLoaded()
      Checks whether the native code has been successfully loaded for the platform.
      Returns:
      true if the native code has been loaded successfully.
    • main

      public static void main(String[] args) throws Exception
      The Main of Crypto.
      Parameters:
      args - Not used.
      Throws:
      Exception - if getCryptoRandom or getCryptoCipher get error.