Commits

Benoît Allard committed af884b9 Draft

DES operations have to be brought back to a signed value

  • Participants
  • Parent commits 0c68788

Comments (0)

Files changed (1)

pythoncard/security/key.py

+from pythoncard.utils import s1
+
 def _longToArray(long):
     """
     Used to transform long to Array
     return l
 
 def _binaryToarray(bytes):
-    return [ord(c) for c in bytes]
+    return [s1(ord(c)) for c in bytes]
 
 def _arrayTobinary(array):
     return ''.join([chr(i & 0xff) for i in array])