Class CryptorConfig

    • Method Detail

      • isCreateRandomNonce

        public boolean isCreateRandomNonce()
        This method returns false by default. You may override this method to create a random nonce individually but only if you know exactly what you are doing and what are the details about the cryptographic algorithm.
        Returns:
        true if the nonce should be created individually from SecureRandom, false to get from initialization vector.
      • getNonceSize

        public final int getNonceSize()
        Description copied from interface: AbstractGetNonceSize
        Unlike Cipher this API is designed for ease of use. Some cryptographic algorithms require an initialization vector (IV) and others do not. With this API you do not have to care and cannot do things wrong. The nonce will be prepended automatically to the encrypted payload and reconstructed from there on decryption. This works both for crypt and for streaming.
        Specified by:
        getNonceSize in interface AbstractGetNonceSize
        Returns:
        the size of the nonce in bytes or 0 for none.
        See Also:
        Cipher.getIV()