Class AbstractCipherVersionGenerator<CV extends CipherVersion>

    • Method Detail

      • next

        public CV next​()
        Generator method to be implemented by subclasses. Required to create implementation dependent cipher version objects. Retrieves the next valid cipher which may be used for encrypting data.
        Specified by:
        next in interface CipherVersionGenerator<CV extends CipherVersion>
        Specified by:
        next in interface org.refcodes.generator.Generator<CV extends CipherVersion>
        Specified by:
        next in interface Iterator<CV extends CipherVersion>
        Returns:
        The next valid CipherVersion for encryption.
      • createCipherUid

        protected String createCipherUid​()
        Hook factory method to be implemented by subclasses. A special algorithm can be used to generate unique cipher UIDs. In case the cipher UID is not unique, another one is requested until a cipher UID is found which is unique regarding the systems of forward secrecy cryptography architecture.
        Returns:
        A more or less unique cipher UID.
      • createCipher

        protected String createCipher​()
        Hook factory method to be implemented by subclasses. A special algorithm is to be implemented creating a good random cipher.
        Returns:
        A good random cipher.