|
|
Generating and Verifying Signatures |
Here is the complete source code for the
VerSig.javaprogram, with some comments added.Compile and run it. Remember, you need to specify three arguments on the command line:
Since you will be testing the output of the
- the name of the file containing the encoded public key bytes,
- the name of the file containing the signature bytes, and
- the name of the data file (the one for which the signature was generated).
GenSigprogram, the filenames you should use are:
suepk
sig
dataHere's a sample run, with what you type in bold:
%java VerSig suepk sig data signature verifies: true
|
|
Generating and Verifying Signatures |