public static byte[] getRandomNonce(final int length) {
        byte[] nonce = new byte[length];
        new SecureRandom().nextBytes(nonce);

        return nonce;
    }
Generate an initialisation vector
@param length Length in bytes of the IV
stroom-core-shared/src/main/java/stroom/crypto/shared/CryptoUtils.java