I want to sign a JAR with my code and without keystores - using only private user's key (because I have a lot of users and keys).
I've found the same question, but it uses keystores, and I want to do it using only PrivateKey
or String
. Is it possible and are there any libraries?
I'll try to clarify the task. For example, we have some user and some service. User creates some module, packs it as the JAR and signs it using it's own private key which stored locally in some DB as the String
.
Then they send it to the service, and this service knows this user's public key (it is stored in the database too). And service verifies this JAR.
I don't want to use keystores and aliases because I'll have to instantiate files on every JAR uploading.