#NEWLINE# def transformKey( self , InputKey ) : #NEWLINE# #INDENT# OutputKey = [ ] #NEWLINE# OutputKey . append ( chr ( ( ord ( InputKey [ 0 ] ) >> 1 ) ) ) #NEWLINE# OutputKey . append ( chr ( ( ( ( ord ( InputKey [ 0 ] ) & 1 ) << 6 ) | ( ord ( InputKey [ 1 ] ) >> 2 ) ) ) ) #NEWLINE# OutputKey . append ( chr ( ( ( ( ord ( InputKey [ 1 ] ) & 3 ) << 5 ) | ( ord ( InputKey [ 2 ] ) >> 3 ) ) ) ) #NEWLINE# OutputKey . append ( chr ( ( ( ( ord ( InputKey [ 2 ] ) & 7 ) << 4 ) | ( ord ( InputKey [ 3 ] ) >> 4 ) ) ) ) #NEWLINE# OutputKey . append ( chr ( ( ( ( ord ( InputKey [ 3 ] ) & 15 ) << 3 ) | ( ord ( InputKey [ 4 ] ) >> 5 ) ) ) ) #NEWLINE# OutputKey . append ( chr ( ( ( ( ord ( InputKey [ 4 ] ) & 31 ) << 2 ) | ( ord ( InputKey [ 5 ] ) >> 6 ) ) ) ) #NEWLINE# OutputKey . append ( chr ( ( ( ( ord ( InputKey [ 5 ] ) & 63 ) << 1 ) | ( ord ( InputKey [ 6 ] ) >> 7 ) ) ) ) #NEWLINE# OutputKey . append ( chr ( ( ord ( InputKey [ 6 ] ) & 127 ) ) ) #NEWLINE# for i in range ( 8 ) : #NEWLINE# #INDENT# OutputKey [ InputKey ] = chr ( ( ( ord ( OutputKey [ i ] ) << 1 ) & 254 ) ) #NEWLINE# #UNINDENT# return '' . join ( OutputKey )