Class AbstractCipherVersionGenerator<CV extends CipherVersion>

    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface org.refcodes.generator.Generator<CV extends CipherVersion>
        Specified by:
        hasNext in interface java.util.Iterator<CV extends CipherVersion>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<CV extends CipherVersion>
      • 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 java.util.Iterator<CV extends CipherVersion>
        Returns:
        The next valid CipherVersion for encryption.
      • createCipherUid

        protected java.lang.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 java.lang.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.