My objective is to perform "Hashsigning" using smart card in python. there are hashlib's used but there is no specific SHA1 or SHA256 functions in python. My Work:
hash_object = hashlib.sha1(b'HelWorld')
pbHash = hash_object.hexdigest()
but the length of the hash object I get is 28 rather i should get 14 or 20 so that i can switch on condition as
switch ( dwHashLen )
{
case 0x14: // SHA1 hash
call scard transmit
case 0x20: // SHA256 hash
}
Any help is appreciated. Thank you in advance