Trail: Security Features in Java SE
Lesson: Generating and Verifying Signatures
Section: Verifying a Digital Signature
Input the Signature Bytes
Home Page > Security Features in Java SE > Generating and Verifying Signatures
Input the Signature Bytes
Next, input the signature bytes from the file specified as the second command line argument.
        FileInputStream sigfis = new FileInputStream(args[1]);
        byte[] sigToVerify = new byte[sigfis.available()]; 
        sigfis.read(sigToVerify);
        sigfis.close();
Now the byte array sigToVerify contains the signature bytes.
Previous page: Input and Convert the Encoded Public Key Bytes
Next page: Verify the Signature

Discuss
We welcome your participation in our community. Please keep your comments civil and on point. You may optionally provide your email address to be notified of replies — your information is not used for any other purpose. By submitting a comment, you agree to these Terms of Use.