Does Signature class expect plain text only or message digest?

Theoritically, signing operation includes the following steps

1. Create Hash of message called Message Digest.

2. Encryption of Hash.

My query is:

Does Signature class expect plain text (in byte[] ) only?

or I need to explicitly create a Message digest first and then pass it to Signature class.

[334 byte] By [Vikas__sharmaa] at [2007-11-27 11:10:58]
# 1

You just pass the 'plain text', the appropriate key and, when verifying, the signature to verify. Everything else is done for you.

sabre150a at 2007-7-29 13:45:12 > top of Java-index,Security,Cryptography...
# 2

Thanks for verification.

I was having the same opinion until I saw some code which was creating explicitly hash and passing that to Signature class.

Vikas__sharmaa at 2007-7-29 13:45:12 > top of Java-index,Security,Cryptography...