Search code examples
javaencryptionpropertieskeysign

Key properties file for digital signature in Java


I'm trying to sign a PDF file with a digital signature and to do this it's needed the data encryption.

I have to use a file that contains the encryption key properties to achieve this, but I really don't know what sorta of file it should be.

In an example I found it just says:

 /**
 * A properties file that is PRIVATE.
 * You should make your own properties file and adapt this line.
 */
public static String PATH = "c:/home/key.properties";
/** Some properties used when signing. */
public static Properties properties = new Properties();

But how can I obtain this "key.properties" file and how it should be like?


Solution

  • Solved reading the links: Properties java tutorial

    And: Digital signatures java tutorial