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 CipherFactory
Factory forCipher
.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description javax.crypto.Cipher
createCipher()
Creates aCipher
.default int
getInitVectorSize()
Allows overriding the init vector size.default void
init(SourceContext context)
Allows for theCipherFactory
to be configured.
-
-
-
Method Detail
-
init
default void init(SourceContext context)
Allows for theCipherFactory
to 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.Exception
Creates aCipher
.- Returns:
Cipher
.- Throws:
java.lang.Exception
- If fails to createCipher
.
-
-