Description: Java allows configuring multiple JCE providers, and looks up requested algorithms by name. This example shows generating RSA signatures with variable digests, and verification of the signed text by the means of RSA public key.
An explanation of the example:
1. Class DataSigning reads the specified file, and creates its digest
2. A unique RSA key pair is created, and the public key is stored with ".key" extension
3. The digest of the text file is signed with the private key
4. During verification, the previously stored public key is retrieved from the file
5. The signature is read from the file
6. The signature is checked, using the public key and newly computed digest of the text
File list (Check if you may need any files):
DataSigning.java
execute.bat
InvalidSignatureException.java
Java.III.DataSigning.txt