java - How to hardcode private key which can be used to encrypt once and decrypt many times? -


in application want use private key encrypt password once , decrypt many times tool run.

application run like:

  • user encrypt password using tool.
  • then user paste password in properties file.
  • when next time tool run read password , decrypt login.

here facing problem like, when encrypt password doing using tool encryption perpose. when try decrypt key different key generated. how can share private key between these 2 tools..

thanks..

i think confusing symetric , asymetric encryption. when doing symetric encryption can use same key. in asymetric encryption have 2 keys. public key can encrypt passwords, can't decrypt them key. possible private key. therefore don't need share key between tools. name suggests private key should never leave system.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -