Digital signature,strange characters


when i try to sign decument with rsa.SignPKCS1v15
I get something like this: "TP1�D�G��Ϳ�Mt�X��l�q��B׋��ǒ7�T��]�Ɠ�x�>�+qi(��z���Ns "
which does not look too good to me :slightly_smiling_face: I tried with node and I do not get characters like “�”

I tried with different private key and it is the same. My code:

Is that the byteresult just tried to print as a string?

I do not know about how node handles it, but what you have here are raw bytes, the most memory efficient way to store the hash/signature.

If you want to print it, you should use base16, 26, or whatever encoding suites you best.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.