Interface ContextFactoryKS<C extends CryptoContext, K extends Key, S extends ContextSpec>

Type Parameters:
C - context type produced
K - key type accepted
S - specification type accepted
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 interface ContextFactoryKS<C extends CryptoContext, K extends Key, S extends ContextSpec>
Creates a cryptographic context from a key and a context specification.

Implementations report provider and parameter failures with unchecked exceptions; context construction is a pure in-memory operation and does not expose an I/O failure contract. Factories must be stateless or otherwise safe for concurrent invocation; returned contexts retain their own documented thread-safety contracts.

Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    createContext(K key, S spec)
    Creates a context bound to the supplied key and specification.
  • Method Details

    • createContext

      C createContext(K key, S spec)
      Creates a context bound to the supplied key and specification.
      Parameters:
      key - non-null key
      spec - resolved context specification; may be null for algorithms that do not require a separate specification (the algorithm's own defaults apply in that case)
      Returns:
      a newly created context