## com.lowagie.text.pdf.crypto
Class IVGenerator

    java.lang.Object
      com.lowagie.text.pdf.crypto.IVGenerator

    public final class IVGenerator

extends java.lang.Object

An initialization vector generator for a CBC block encryption. It's a random generator based on ARCFOUR.

Author:
  Paulo Soares (psoares@consiste.pt)

Field Summary
`private static ARCFOUREncryption` `arcfour`

Constructor Summary
`private` `IVGenerator()` Creates a new instance of IVGenerator

Method Summary
`static byte[]` `getIV()` Gets a 16 byte random initialization vector.
`static byte[]` `getIV(int len)` Gets a random initialization vector.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### arcfour

    private static ARCFOUREncryption arcfour

Constructor Detail

### IVGenerator

    private IVGenerator()

  Creates a new instance of IVGenerator

Method Detail

### getIV

    public static byte[] getIV()

  Gets a 16 byte random initialization vector.

  Returns:
    a 16 byte random initialization vector

### getIV

    public static byte[] getIV(int len)

  Gets a random initialization vector.

  Parameters:
    `len` - the length of the initialization vector
  Returns:
    a random initialization vector

Hosted by Hostbasket