Class CryptoProviders

java.lang.Object
ghidra.formats.gfilesystem.crypto.CryptoProviders

public class CryptoProviders extends Object
  • Method Details

    • getInstance

      public static CryptoProviders getInstance()
      Fetch the global CryptoProviders singleton instance.
      Returns:
      shared CryptoProviders singleton instance
    • registerCryptoProvider

      public void registerCryptoProvider(CryptoProvider provider)
      Adds a CryptoProvider to this registry.

      TODO: do we need provider priority ordering?

      Parameters:
      provider - CryptoProvider
    • unregisterCryptoProvider

      public void unregisterCryptoProvider(CryptoProvider provider)
      Removes a CryptoProvider from this registry.
      Parameters:
      provider - CryptoProvider to remove
    • getCachedCryptoProvider

      public CachedPasswordProvider getCachedCryptoProvider()
      Returns the CachedPasswordProvider.

      (Used by GUI actions to manage the cache)

      Returns:
      cached crypto provider instance
    • getCryptoProviderInstance

      public <T extends CryptoProvider> T getCryptoProviderInstance(Class<T> providerClass)
      Returns the previously registered matching CryptoProvider instance.
      Type Parameters:
      T - CryptoProvider type
      Parameters:
      providerClass - CryptoProvider class
      Returns:
      previously registered CryptoProvider instance, or null if not found
    • newSession

      public CryptoSession newSession()
      Creates a new CryptoSession.

      TODO: to truly be effective when multiple files are being opened (ie. batch import), nested sessions need to be implemented.

      Returns:
      new CryptoSession instance