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 for Cipher.
    Author:
    Daniel Sagenschneider
    • Method Detail

      • getInitVectorSize

        default int getInitVectorSize()
        Allows overriding the init vector size.
        Returns:
        Init vector size.
      • createCipher

        javax.crypto.Cipher createCipher()
                                  throws java.lang.Exception
        Creates a Cipher.
        Returns:
        Cipher.
        Throws:
        java.lang.Exception - If fails to create Cipher.