Interface ContextFactoryKS<C extends CryptoContext, K extends Key, S extends ContextSpec>
- Type Parameters:
C- context type producedK- key type acceptedS- 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 TypeMethodDescriptioncreateContext(K key, S spec) Creates a context bound to the supplied key and specification.
-
Method Details
-
createContext
Creates a context bound to the supplied key and specification.- Parameters:
key- non-null keyspec- resolved context specification; may benullfor algorithms that do not require a separate specification (the algorithm's own defaults apply in that case)- Returns:
- a newly created context
-