Home > Back-end >  Add generated keys to properties file
Add generated keys to properties file

Time:09-23

I have a set of public and private keys generated based on RSA. Now, I want to add them to my properties file. How can I accomplish it? key is 1024 bit. Only first line is assigned and the next lines are not assigned I tried creating a following key:

key.private=<private key>

but it shows an error

CodePudding user response:

What is error and do you want to append keys dynamically into properties file?

CodePudding user response:

You didn't reveal your code so the description of problem looks very poorly to me. I guess the cause is one of the following:

  • some issue with key uniqueness - assuming the properties are backed by java.util.Properties, which is a Map, it is not possible to have two entries with same key.
  • invalid line break of long property values (see here)

With further description it is hard to give more precise advice.

  • Related