The JavaTM Tutorial

| Start of Tutorial > Start of Trail > Start of Lesson | Search Feedback Form

Trail: Security in Java 2 SDK 1.2
Lesson: Generating and Verifying Signatures

## Compile and Run the Program

> `Here` is the complete source code for the `GenSig.java` program, with some comments added. Compile and run it. Remember, you need to specify the name of a file to be signed, as in

> >     java GenSig data

> You can download and use this sample file named `data` or any other file you like. The file will not be modified. It will be read so that a signature can be generated for it.

> After executing the program, you should see the saved `suepk` (public key) and `sig` (signature) files.

| Start of Tutorial > Start of Trail > Start of Lesson | Search Feedback Form

Copyright 1995-2001 Sun Microsystems, Inc. All rights reserved.