From d98a889133b76fd476311b90a3efa22d74987639 Mon Sep 17 00:00:00 2001 From: oepen Date: Wed, 17 Aug 2011 10:41:19 +0000 Subject: [PATCH] Fixed urandom() usage git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@490 96b47cad-a561-4643-ad3b-153ac7d7599c --- virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardSAM.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardSAM.py b/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardSAM.py index e68f80e..310bdee 100644 --- a/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardSAM.py +++ b/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardSAM.py @@ -278,8 +278,7 @@ class SAM(object): length = 8 #Length of the challenge in Byte self.last_challenge = urandom(length) - logging.debug("Generated challenge: %s" % str(self.last_challenge)) - self.last_challenge = inttostring(self.last_challenge, length) + logging.debug("Generated challenge: %s" % self.last_challenge) return SW["NORMAL"], self.last_challenge