pyauth / python-pkcs11

PKCS#11/Cryptoki support for Python
MIT License
149 stars 71 forks source link

Return value in bytes if the attribute is not currently handled + add object dictionary for printing #148

Open Muzosh opened 1 year ago

Muzosh commented 1 year ago

Hey, I would like to propose a fix to an information loss.

Sometimes, the library does not know, how to "unpack" certain attributes. I think it would be great to at least return the value in byte array. Currently, the code just raises an exception while providing just the key, but some developers might utilize the returned value and translate it themselves.