org.jasypt.iv

## Class NoIvGenerator

- Object
- - org.jasypt.iv.NoIvGenerator

- All Implemented Interfaces:
    IvGenerator

      public class NoIvGenerator
      extends Object
      implements IvGenerator

  This implementation of `IvGenerator` always returns a initialization vector (IV) of length 0.

  This class is thread-safe.

  Since:
    1.9.3
  Author:
    Hoki Torres

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NoIvGenerator()` Creates a new instance of `NoIvGenerator`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `generateIv(int lengthBytes)` Return IV with 0 byte length.
    `boolean` | `includePlainIvInEncryptionResults()` As this IV generator provides an empty vector, its inclusion unencrypted in encryption results is not necessary.

    - ### Methods inherited from class Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NoIvGenerator

          public NoIvGenerator()

      Creates a new instance of `NoIvGenerator`

  - ### Method Detail

    - #### generateIv

          public byte[] generateIv(int lengthBytes)

      Return IV with 0 byte length.
      Specified by:
        `generateIv` in interface `IvGenerator`
      Parameters:
        `lengthBytes` - length in bytes.
      Returns:
        the generated IV.

    - #### includePlainIvInEncryptionResults

          public boolean includePlainIvInEncryptionResults()

      As this IV generator provides an empty vector, its inclusion unencrypted in encryption results is not necessary.
      Specified by:
        `includePlainIvInEncryptionResults` in interface `IvGenerator`
      Returns:
        false

Copyright © 2019 The JASYPT team. All rights reserved.