文档

Java™ 教程-Java Tutorials 中文版
编译并运行程序
Trail: Security Features in Java SE
Lesson: Generating and Verifying Signatures
Section: Verifying a Digital Signature

编译并运行程序

Hereis the complete source code for the VerSig.java program, with some comments added.

Compile and run the program. Remember, you need to specify three arguments on the command line:

Since you will be testing the output of the GenSig program, the file names you should use are

Here's a sample run; the bold indicates what you type.

%java VerSig suepk sig data
signature verifies: true

Previous page: Verify the Signature
Next page: Weaknesses and Alternatives