Class GeneralParametersWithIV<T extends GeneralParameters>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int blockSize  
      protected byte[] iv  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getIV()
      Return a copy of the current IV value.
      T withIV​(byte[] iv)
      Return an implementation of our parameterized type containing the passed in IV.
      T withIV​(java.security.SecureRandom random)
      Return an implementation of our parameterized type with an IV constructed from the passed in SecureRandom.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • blockSize

        protected final int blockSize
      • iv

        protected final byte[] iv
    • Method Detail

      • withIV

        public T withIV​(java.security.SecureRandom random)
        Return an implementation of our parameterized type with an IV constructed from the passed in SecureRandom.
        Specified by:
        withIV in interface ParametersWithIV<T extends GeneralParameters>
        Parameters:
        random - the SecureRandom to use as the source of IV data.
        Returns:
        a new instance of our parameterized type with a new IV.
      • withIV

        public T withIV​(byte[] iv)
        Return an implementation of our parameterized type containing the passed in IV.
        Specified by:
        withIV in interface ParametersWithIV<T extends GeneralParameters>
        Parameters:
        iv - the bytes making up the iv, or nonce, to use.
        Returns:
        a new instance of our parameterized type with a new IV.