اذهب إلى المحتوى

Rusul Altaie

الأعضاء
  • المساهمات

    4
  • تاريخ الانضمام

  • تاريخ آخر زيارة

أجوبة بواسطة Rusul Altaie

  1. السلام عليكم  

    عند تنفيذ الكود ظهر لي هذا الخطأ NameError: name ‘roundkeys’ is not defined كيف يمكن حله؟

    هذا الكود 

     :def decrypt(self,block)
           state = string2number(block)
           :for i in range(1,31)
                 state = addRoundKey(state,roundkeys[-i-1])
                 state = pLayer_dec(state)
                 state = sBoxLayer_dec(state)
           decipher = addRoundKey(state,roundkeys[0])
           return number2string_N(decipher,8)

     

    • أعجبني 1
  2. السلام عليكم، عند تنفيذ الدالة التالية يظهر لي خطأ.

    :def decrypt(self,block)
         []=roundkeys 

        state = string2number(block)
     :  for i in range(1, 31)
           state = addRoundKey(state, roundkeys[-i-1])
           state = pLayer_dec(state)
           state = sBoxLayer_dec(state)
        decipher = addRoundKey(state, roundkeys[0])
        return number2string_N(decipher,8)

    الخطأ الذي يظهر:

    state = addRoundKey(state, roundkeys[-i-1])
    IndexError: list index out of range

    • أعجبني 1
×
×
  • أضف...