#NEWLINE# def __init__( self , key , iv , segment_size = 1 ) : #NEWLINE# #INDENT# if ( segment_size == 0 ) : #NEWLINE# #INDENT# segment_size = 1 #NEWLINE# #UNINDENT# if ( iv is None ) : #NEWLINE# #INDENT# self . _shift_register = ( [ 0 ] * 16 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( iv ) != 16 ) : #NEWLINE# #INDENT# raise ValueError ( 'initialization vector must be 16 bytes' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _shift_register = _string_to_bytes ( iv ) #NEWLINE# #UNINDENT# #UNINDENT# self . _segment_bytes = segment_size #NEWLINE# AESBlockModeOfOperation . __init__ ( self , segment_size )