Documentation

The Java™ Tutorials
Hide TOC
Compile and Run the Program编译并运行程序
Trail: Security Features in Java SE
Lesson: Generating and Verifying Signatures
Section: Verifying a Digital Signature

Compile and Run the Program编译并运行程序

Here is the complete source code for the VerSig.java program, with some comments added.此处是VerSigjava程序的完整源代码,并添加了一些注释。

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由于您将测试GenSig程序的输出,因此您应该使用的文件名是

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