コード例 #1
0
def transposition_index_generation(TBOX, j):
    '''
    Used for transposition of ciphered Bytes among N places
    ( N - size of secret file ) using TBOX
    '''
    TIndex = 0
    for i in range(0, LT):
        TIndex = TIndex << i
        TIndex = int(binstr.b_or(bin(TIndex)[2:].zfill(8), TBOX[j][i]), 2)
    return TIndex