Using SHA1 and RSA with java.security.Signature vs. MessageDigest and Cipher

后端 未结 6 565
鱼传尺愫
鱼传尺愫 2020-11-27 10:48

I\'m trying to understand what the Java java.security.Signature class does. If I compute an SHA1 message digest, and then encrypt that digest using RSA, I get a dif

6条回答
  •  抹茶落季
    2020-11-27 11:48

    Erm, after understanding your question: are you sure that the signature-method only creates a SHA1 and encrypts it? GPG et al offer to compress/clear sign the data. Maybe this java-signature-alg also creates a detachable/attachable signature.

提交回复
热议问题