Bugfixes: Wrong number of arguments for function call and missing import
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@474 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -124,7 +124,7 @@ def crypto_checksum(algo, key, data, iv=None, ssc=None):
|
|||||||
raise ValueError, "Unknown Algorithm %s" % algo
|
raise ValueError, "Unknown Algorithm %s" % algo
|
||||||
|
|
||||||
if algo == "MAC":
|
if algo == "MAC":
|
||||||
checksum = calculate_MAC(key, data, 0x00, iv) #FIXME: IV?
|
checksum = calculate_MAC(key, data, iv)
|
||||||
elif algo == "HMAC":
|
elif algo == "HMAC":
|
||||||
hmac = HMAC.new(key, data)
|
hmac = HMAC.new(key, data)
|
||||||
checksum = hmac.hexdigest()
|
checksum = hmac.hexdigest()
|
||||||
|
|||||||
@@ -16,6 +16,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License along with
|
# You should have received a copy of the GNU General Public License along with
|
||||||
# virtualsmartcard. If not, see <http://www.gnu.org/licenses/>.
|
# virtualsmartcard. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
from vsmartcard.utils import stringtoint
|
||||||
|
|
||||||
TAG = {}
|
TAG = {}
|
||||||
TAG["FILECONTROLPARAMETERS"] = 0x62
|
TAG["FILECONTROLPARAMETERS"] = 0x62
|
||||||
TAG["FILEMANAGEMENTDATA"] = 0x64
|
TAG["FILEMANAGEMENTDATA"] = 0x64
|
||||||
|
|||||||
Reference in New Issue
Block a user