whats the assert keysize doing hear : def encryptData(key, data,mode=AESModeOfOperation.modeOfOperation["CBC"]):
    """encrypt `data` using `key`
    `key` should be a string of bytes.
    returned cipher is a string of bytes prepended with the initialization
    vector.
    """
    key = map(ord, key)
    if mode == AESModeOfOperation.modeOfOperation["CBC"]:
        data = append_PKCS7_padding(data)
    keysize = len(key)






    assert keysize in AES.keySize.values(), 'invalid key size: %s' % keysize






    # create a new iv using random data
    iv = [ord(i) for i in os.urandom(16)]
    moo = AESModeOfOperation()
    (mode, length, ciph) = moo.encrypt(data, mode, key, keysize, iv)
    # With padding, the original length does not need to be known. It's a bad
    # idea to store the original message length.
    # prepend the iv.
    return ''.join(map(chr, iv)) + ''.join(map(chr, ciph))
