Interface CipherFactory
-
- All Known Implementing Classes:
AesCipherFactory
- 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 CipherFactoryFactory forCipher.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description javax.crypto.CiphercreateCipher()Creates aCipher.default intgetInitVectorSize()Allows overriding the init vector size.default voidinit(SourceContext context)Allows for theCipherFactoryto be configured.
-
-
-
Method Detail
-
init
default void init(SourceContext context)
Allows for theCipherFactoryto be configured.- Parameters:
context-SourceContext.
-
getInitVectorSize
default int getInitVectorSize()
Allows overriding the init vector size.- Returns:
- Init vector size.
-
createCipher
javax.crypto.Cipher createCipher() throws java.lang.ExceptionCreates aCipher.- Returns:
Cipher.- Throws:
java.lang.Exception- If fails to createCipher.
-
-