def pkcs_os2ip(x):
 return int(x.encode('hex'), 16)

def pkcs_os2ip ( x ) : return int ( x . encode ( 'hex' ) , 16 )
accepts a byte string as input parameter and return the associated long value: input : x octet string to be converted output: x corresponding nonnegative integer reverse function is pkcs_i2osp() .