Interface GenericJcaSignatureContext.EngineFactory

Enclosing class:
GenericJcaSignatureContext
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface GenericJcaSignatureContext.EngineFactory
Factory of initialized Signature engines.

Implementations must return a ready-to-use Signature configured for signing or verifying with the given key.

  • Method Summary

    Modifier and Type
    Method
    Description
    create(Key key, boolean signMode)
    Creates and initializes a Signature for the given key and mode.
  • Method Details

    • create

      Signature create(Key key, boolean signMode) throws GeneralSecurityException
      Creates and initializes a Signature for the given key and mode.
      Parameters:
      key - key to initialize the engine with; PrivateKey for sign mode, PublicKey for verify mode
      signMode - true for signing, false for verifying
      Returns:
      initialized Signature ready for incremental update(...) calls
      Throws:
      GeneralSecurityException - if engine creation or initialization fails