'CBC encryption - overloads baseCipher to allow optional explicit IV
when iv=None, iv is auto generated!'

def encrypt(self, plainText, iv=None, more=None):

    if (self.encryptBlockCount == 0):
        self.iv = iv
    else:
        assert (iv == None), 'IV    used    only    on    first    call    to    encrypt'
    return BlockCipher.encrypt(self, plainText, more=more)
